diff --git a/dlls/wined3d/adapter_gl.c b/dlls/wined3d/adapter_gl.c index b08ba62ad03..e2cd96fa9c4 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 eb64f14f480..e52e4bcff53 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 7e6b5101bc4..a2fb09c39e1 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 f2ae39e565b..1d2ffbbc981 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 5241b6c41e1..0e5ae5e1721 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 b649a479f71..2b7172a6dc5 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