Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
993075cd
Commit
993075cd
authored
Jan 08, 2015
by
Matteo Bruni
Committed by
Alexandre Julliard
Jan 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Prefer the core glActiveTexture function.
parent
c603e479
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
7 deletions
+21
-7
arb_program_shader.c
dlls/wined3d/arb_program_shader.c
+1
-1
context.c
dlls/wined3d/context.c
+4
-4
directx.c
dlls/wined3d/directx.c
+13
-0
gl_compat.c
dlls/wined3d/gl_compat.c
+3
-2
No files found.
dlls/wined3d/arb_program_shader.c
View file @
993075cd
...
...
@@ -7294,7 +7294,7 @@ static void upload_palette(const struct wined3d_texture *texture, struct wined3d
if
(
!
priv
->
palette_texture
)
gl_info
->
gl_ops
.
gl
.
p_glGenTextures
(
1
,
&
priv
->
palette_texture
);
GL_EXTCALL
(
glActiveTexture
ARB
(
GL_TEXTURE1
));
GL_EXTCALL
(
glActiveTexture
(
GL_TEXTURE1
));
gl_info
->
gl_ops
.
gl
.
p_glBindTexture
(
GL_TEXTURE_1D
,
priv
->
palette_texture
);
gl_info
->
gl_ops
.
gl
.
p_glTexEnvi
(
GL_TEXTURE_ENV
,
GL_TEXTURE_ENV_MODE
,
GL_REPLACE
);
...
...
dlls/wined3d/context.c
View file @
993075cd
...
...
@@ -1328,8 +1328,8 @@ static void bind_dummy_textures(const struct wined3d_device *device, const struc
for
(
i
=
0
;
i
<
count
;
++
i
)
{
GL_EXTCALL
(
glActiveTexture
ARB
(
GL_TEXTURE0_ARB
+
i
));
checkGLcall
(
"glActiveTexture
ARB
"
);
GL_EXTCALL
(
glActiveTexture
(
GL_TEXTURE0
+
i
));
checkGLcall
(
"glActiveTexture"
);
gl_info
->
gl_ops
.
gl
.
p_glBindTexture
(
GL_TEXTURE_2D
,
device
->
dummy_texture_2d
[
i
]);
checkGLcall
(
"glBindTexture"
);
...
...
@@ -2115,8 +2115,8 @@ void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer)
/* Context activation is done by the caller. */
void
context_active_texture
(
struct
wined3d_context
*
context
,
const
struct
wined3d_gl_info
*
gl_info
,
unsigned
int
unit
)
{
GL_EXTCALL
(
glActiveTexture
ARB
(
GL_TEXTURE0
+
unit
));
checkGLcall
(
"glActiveTexture
ARB
"
);
GL_EXTCALL
(
glActiveTexture
(
GL_TEXTURE0
+
unit
));
checkGLcall
(
"glActiveTexture"
);
context
->
active_texture
=
unit
;
}
...
...
dlls/wined3d/directx.c
View file @
993075cd
...
...
@@ -2873,6 +2873,9 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
USE_GL_FUNC
(
wglGetPixelFormatAttribivARB
)
USE_GL_FUNC
(
wglSetPixelFormatWINE
)
USE_GL_FUNC
(
wglSwapIntervalEXT
)
/* Newer core functions */
USE_GL_FUNC
(
glActiveTexture
)
/* OpenGL 1.3 */
#undef USE_GL_FUNC
#ifndef USE_WIN32_OPENGL
...
...
@@ -2880,6 +2883,16 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
/* note that we still need the above wglGetProcAddress calls to initialize the table */
gl_info
->
gl_ops
.
ext
=
((
struct
opengl_funcs
*
)
NtCurrentTeb
()
->
glTable
)
->
ext
;
#endif
#define MAP_GL_FUNCTION(core_func, ext_func) \
do \
{ \
if (!gl_info->gl_ops.ext.p_##core_func) \
gl_info->gl_ops.ext.p_##core_func = gl_info->gl_ops.ext.p_##ext_func; \
} while (0)
MAP_GL_FUNCTION
(
glActiveTexture
,
glActiveTextureARB
);
#undef MAP_GL_FUNCTION
}
static
void
wined3d_adapter_init_limits
(
struct
wined3d_gl_info
*
gl_info
)
...
...
dlls/wined3d/gl_compat.c
View file @
993075cd
...
...
@@ -112,7 +112,8 @@ static void WINE_GLAPI wine_glMultiTexCoord4svARB(GLenum target, const GLshort *
context_get_current
()
->
gl_info
->
gl_ops
.
gl
.
p_glTexCoord4sv
(
v
);
}
static
void
WINE_GLAPI
wine_glActiveTextureARB
(
GLenum
texture
)
{
static
void
WINE_GLAPI
wine_glActiveTexture
(
GLenum
texture
)
{
if
(
texture
!=
GL_TEXTURE0
)
{
ERR
(
"Texture unit > 0 used, but GL_ARB_multitexture is not supported
\n
"
);
return
;
...
...
@@ -351,7 +352,7 @@ void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info)
if
(
!
gl_info
->
supported
[
ARB_MULTITEXTURE
])
{
TRACE
(
"Applying GL_ARB_multitexture emulation hooks
\n
"
);
gl_info
->
gl_ops
.
ext
.
p_glActiveTexture
ARB
=
wine_glActiveTextureARB
;
gl_info
->
gl_ops
.
ext
.
p_glActiveTexture
=
wine_glActiveTexture
;
gl_info
->
gl_ops
.
ext
.
p_glClientActiveTextureARB
=
wine_glClientActiveTextureARB
;
gl_info
->
gl_ops
.
ext
.
p_glMultiTexCoord1fARB
=
wine_glMultiTexCoord1fARB
;
gl_info
->
gl_ops
.
ext
.
p_glMultiTexCoord1fvARB
=
wine_glMultiTexCoord1fvARB
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment