Henri Verbeet : wined3d: Store the glEnableWINE and glDisableWINE pointers in the wined3d_gl_info structure.
Alexandre Julliard
julliard at winehq.org
Wed May 8 18:22:47 CDT 2019
Module: wine
Branch: master
Commit: da42cf905d07613ad5243ddee16486369025eb6e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=da42cf905d07613ad5243ddee16486369025eb6e
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Wed May 8 18:09:36 2019 +0430
wined3d: Store the glEnableWINE and glDisableWINE pointers in the wined3d_gl_info structure.
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/adapter_gl.c | 4 ++--
dlls/wined3d/context.c | 2 +-
dlls/wined3d/gl_compat.c | 8 ++++----
dlls/wined3d/state.c | 4 ++--
dlls/wined3d/wined3d_gl.h | 3 ---
dlls/wined3d/wined3d_private.h | 3 +++
6 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c
index b08ba62..e2cd96f 100644
--- a/dlls/wined3d/adapter_gl.c
+++ b/dlls/wined3d/adapter_gl.c
@@ -4654,8 +4654,8 @@ static BOOL wined3d_adapter_gl_init(struct wined3d_adapter_gl *adapter_gl,
}
#endif
- glEnableWINE = gl_info->gl_ops.gl.p_glEnable;
- glDisableWINE = gl_info->gl_ops.gl.p_glDisable;
+ gl_info->p_glEnableWINE = gl_info->gl_ops.gl.p_glEnable;
+ gl_info->p_glDisableWINE = gl_info->gl_ops.gl.p_glDisable;
if (!wined3d_caps_gl_ctx_create(&adapter_gl->a, &caps_gl_ctx))
{
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c
index eb64f14..e52e4bc 100644
--- a/dlls/wined3d/context.c
+++ b/dlls/wined3d/context.c
@@ -2978,7 +2978,7 @@ void context_apply_ffp_blit_state(struct wined3d_context *context, const struct
/* Other misc states. */
gl_info->gl_ops.gl.p_glDisable(GL_LIGHTING);
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_LIGHTING));
- glDisableWINE(GL_FOG);
+ gl_info->p_glDisableWINE(GL_FOG);
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_FOGENABLE));
if (gl_info->supported[EXT_SECONDARY_COLOR])
diff --git a/dlls/wined3d/gl_compat.c b/dlls/wined3d/gl_compat.c
index 7e6b510..a2fb09c 100644
--- a/dlls/wined3d/gl_compat.c
+++ b/dlls/wined3d/gl_compat.c
@@ -437,10 +437,10 @@ void install_gl_compat_wrapper(struct wined3d_gl_info *gl_info, enum wined3d_gl_
gl_info->gl_ops.gl.p_glFogf = wine_glFogf;
old_fogcoord_glFogfv = gl_info->gl_ops.gl.p_glFogfv;
gl_info->gl_ops.gl.p_glFogfv = wine_glFogfv;
- old_fogcoord_glEnable = glEnableWINE;
- glEnableWINE = wine_glEnable;
- old_fogcoord_glDisable = glDisableWINE;
- glDisableWINE = wine_glDisable;
+ old_fogcoord_glEnable = gl_info->p_glEnableWINE;
+ gl_info->p_glEnableWINE = wine_glEnable;
+ old_fogcoord_glDisable = gl_info->p_glDisableWINE;
+ gl_info->p_glDisableWINE = wine_glDisable;
old_fogcoord_glVertex4f = gl_info->gl_ops.gl.p_glVertex4f;
gl_info->gl_ops.gl.p_glVertex4f = wine_glVertex4f;
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index f2ae39e..1d2ffbb 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -1125,7 +1125,7 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
if (!state->render_states[WINED3D_RS_FOGENABLE])
{
/* No fog? Disable it, and we're done :-) */
- glDisableWINE(GL_FOG);
+ gl_info->p_glDisableWINE(GL_FOG);
checkGLcall("glDisable GL_FOG");
return;
}
@@ -1262,7 +1262,7 @@ void state_fog_fragpart(struct wined3d_context *context, const struct wined3d_st
}
}
- glEnableWINE(GL_FOG);
+ gl_info->p_glEnableWINE(GL_FOG);
checkGLcall("glEnable GL_FOG");
if (new_source != context->fog_source || fogstart == fogend)
{
diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h
index 5241b6c..0e5ae5e 100644
--- a/dlls/wined3d/wined3d_gl.h
+++ b/dlls/wined3d/wined3d_gl.h
@@ -28,9 +28,6 @@
#define GL_COMPRESSED_LUMINANCE_ALPHA_3DC_ATI 0x8837 /* not in the gl spec */
-void (WINE_GLAPI *glDisableWINE)(GLenum cap) DECLSPEC_HIDDEN;
-void (WINE_GLAPI *glEnableWINE)(GLenum cap) DECLSPEC_HIDDEN;
-
/* OpenGL extensions. */
enum wined3d_gl_extension
{
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index b649a47..2b7172a 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -2656,6 +2656,9 @@ struct wined3d_gl_info
HGLRC (WINAPI *p_wglCreateContextAttribsARB)(HDC dc, HGLRC share, const GLint *attribs);
struct opengl_funcs gl_ops;
struct wined3d_fbo_ops fbo_ops;
+
+ void (WINE_GLAPI *p_glDisableWINE)(GLenum cap);
+ void (WINE_GLAPI *p_glEnableWINE)(GLenum cap);
};
/* The driver names reflect the lowest GPU supported
More information about the wine-cvs
mailing list