Commit da42cf90 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Store the glEnableWINE and glDisableWINE pointers in the wined3d_gl_info structure.

parent 3d2b82a2
......@@ -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))
{
......
......@@ -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])
......
......@@ -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;
......
......@@ -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)
{
......
......@@ -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
{
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment