Module: wine Branch: refs/heads/master Commit: f8ed06ea3dbdf0e45786712de0bfc65ef215e364 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=f8ed06ea3dbdf0e45786712d...
Author: Roderick Colenbrander thunderbird2k@gmx.net Date: Thu Mar 2 13:27:13 2006 +0100
wined3d: Opengl 2.x compile fix.
---
dlls/wined3d/device.c | 15 +++++++++++---- include/wine/wined3d_gl.h | 7 ++++++- 2 files changed, 17 insertions(+), 5 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index dd72818..7d8e4f2 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3767,8 +3767,12 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRen }
if(!This->stateBlock->renderState[WINED3DRS_TWOSIDEDSTENCILMODE]) { - glStencilOpSeparate(GL_BACK, stencilFail, depthFail, stencilPass); - checkGLcall("glStencilOpSeparate(GL_BACK,...)"); + if(GL_EXTCALL(glStencilOpSeparate)) { + GL_EXTCALL(glStencilOpSeparate(GL_BACK, stencilFail, depthFail, stencilPass)); + checkGLcall("glStencilOpSeparate(GL_BACK,...)"); + } else { + WARN("Unsupported in local OpenGL implementation: glStencilOpSeparate\n"); + } } else { glStencilOp(stencilFail, depthFail, stencilPass); checkGLcall("glStencilOp(...)"); @@ -3796,8 +3800,11 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRen } This->stencilfunc = func; if(!This->stateBlock->renderState[WINED3DRS_TWOSIDEDSTENCILMODE]) { - glStencilFuncSeparate(GL_BACK, func, ref, mask); - checkGLcall("glStencilFuncSeparate(GL_BACK,...)"); + if(GL_EXTCALL(glStencilFuncSeparate)) { + GL_EXTCALL(glStencilFuncSeparate(GL_BACK, func, ref, mask)); + checkGLcall("glStencilOpSeparate(GL_BACK,...)"); + } else + WARN("Unsupported in local OpenGL implementation: glStencilFuncSeparate\n"); } else { glStencilFunc(func, ref, mask); checkGLcall("glStencilFunc(...)"); diff --git a/include/wine/wined3d_gl.h b/include/wine/wined3d_gl.h index 200bba1..fa391ba 100644 --- a/include/wine/wined3d_gl.h +++ b/include/wine/wined3d_gl.h @@ -803,7 +803,9 @@ typedef void (APIENTRY * PGLFNBEGINOCCLU typedef void (APIENTRY * PGLFNENDOCCLUSIONQUERYNVPROC) (void); typedef void (APIENTRY * PGLFNGETOCCLUSIONQUERYIVNVPROC) (GLuint id, GLenum pname, GLint *params); typedef void (APIENTRY * PGLFNGETOCCLUSIONQUERYUIVNVPROC) (GLuint id, GLenum pname, GLuint *params); - +/* OpenGL 2.0 */ +typedef void (APIENTRY * PGLFNSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); +typedef void (APIENTRY * PGLFNSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
/**************************************************** * OpenGL Official Version @@ -1032,6 +1034,9 @@ typedef enum _GL_SupportedExt { USE_GL_FUNC(PGLFNVERTEXATTRIBPOINTERARBPROC, glVertexAttribPointerARB); \ USE_GL_FUNC(PGLFNENABLEVERTEXATTRIBARRAYARBPROC, glEnableVertexAttribArrayARB); \ USE_GL_FUNC(PGLFNDISABLEVERTEXATTRIBARRAYARBPROC, glDisableVertexAttribArrayARB); \ + /* OpenGL 2.0 */ \ + USE_GL_FUNC(PGLFNSTENCILOPSEPARATEPROC, glStencilOpSeparate); \ + USE_GL_FUNC(PGLFNSTENCILFUNCSEPARATEPROC, glStencilFuncSeparate); \
#define GLX_EXT_FUNCS_GEN \ /** GLX_VERSION_1_3 **/ \