Commit a187ab05 authored by Roderick Colenbrander's avatar Roderick Colenbrander Committed by Alexandre Julliard

wined3d: Don't use OpenGL 2.0.

parent c72f68ef
...@@ -3166,11 +3166,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE ...@@ -3166,11 +3166,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE
} }
This->stencilfunc = func; This->stencilfunc = func;
if(!This->stateBlock->renderState[WINED3DRS_TWOSIDEDSTENCILMODE]) { if(!This->stateBlock->renderState[WINED3DRS_TWOSIDEDSTENCILMODE]) {
#if 0 /* Don't use OpenGL 2.0 calls for now */
if(GL_EXTCALL(glStencilFuncSeparate)) { if(GL_EXTCALL(glStencilFuncSeparate)) {
GL_EXTCALL(glStencilFuncSeparate(GL_FRONT, func, ref, mask)); GL_EXTCALL(glStencilFuncSeparate(GL_FRONT, func, ref, mask));
checkGLcall("glStencilFuncSeparate(GL_FRONT,...)"); checkGLcall("glStencilFuncSeparate(GL_FRONT,...)");
} }
else if(GL_SUPPORT(EXT_STENCIL_TWO_SIDE)) { else
#endif
if(GL_SUPPORT(EXT_STENCIL_TWO_SIDE)) {
glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT); glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT);
checkGLcall("glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT)"); checkGLcall("glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT)");
GL_EXTCALL(glActiveStencilFaceEXT(GL_FRONT)); GL_EXTCALL(glActiveStencilFaceEXT(GL_FRONT));
...@@ -3242,11 +3245,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE ...@@ -3242,11 +3245,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE
} }
if(!This->stateBlock->renderState[WINED3DRS_TWOSIDEDSTENCILMODE]) { if(!This->stateBlock->renderState[WINED3DRS_TWOSIDEDSTENCILMODE]) {
#if 0 /* Don't use OpenGL 2.0 calls for now */
if(GL_EXTCALL(glStencilOpSeparate)) { if(GL_EXTCALL(glStencilOpSeparate)) {
GL_EXTCALL(glStencilOpSeparate(GL_FRONT, stencilFail, depthFail, stencilPass)); GL_EXTCALL(glStencilOpSeparate(GL_FRONT, stencilFail, depthFail, stencilPass));
checkGLcall("glStencilOpSeparate(GL_FRONT,...)"); checkGLcall("glStencilOpSeparate(GL_FRONT,...)");
} }
else if(GL_SUPPORT(EXT_STENCIL_TWO_SIDE)) { else
#endif
if(GL_SUPPORT(EXT_STENCIL_TWO_SIDE)) {
glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT); glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT);
checkGLcall("glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT)"); checkGLcall("glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT)");
GL_EXTCALL(glActiveStencilFaceEXT(GL_FRONT)); GL_EXTCALL(glActiveStencilFaceEXT(GL_FRONT));
...@@ -3789,11 +3795,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE ...@@ -3789,11 +3795,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE
} }
if(!This->stateBlock->renderState[WINED3DRS_TWOSIDEDSTENCILMODE]) { if(!This->stateBlock->renderState[WINED3DRS_TWOSIDEDSTENCILMODE]) {
#if 0 /* Don't use OpenGL 2.0 calls for now */
if(GL_EXTCALL(glStencilOpSeparate)) { if(GL_EXTCALL(glStencilOpSeparate)) {
GL_EXTCALL(glStencilOpSeparate(GL_BACK, stencilFail, depthFail, stencilPass)); GL_EXTCALL(glStencilOpSeparate(GL_BACK, stencilFail, depthFail, stencilPass));
checkGLcall("glStencilOpSeparate(GL_BACK,...)"); checkGLcall("glStencilOpSeparate(GL_BACK,...)");
} }
else if(GL_SUPPORT(EXT_STENCIL_TWO_SIDE)) { else
#endif
if(GL_SUPPORT(EXT_STENCIL_TWO_SIDE)) {
glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT); glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT);
checkGLcall("glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT)"); checkGLcall("glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT)");
GL_EXTCALL(glActiveStencilFaceEXT(GL_BACK)); GL_EXTCALL(glActiveStencilFaceEXT(GL_BACK));
...@@ -3836,11 +3845,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE ...@@ -3836,11 +3845,14 @@ HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, D3DRENDE
} }
This->stencilfunc = func; This->stencilfunc = func;
if(!This->stateBlock->renderState[WINED3DRS_TWOSIDEDSTENCILMODE]) { if(!This->stateBlock->renderState[WINED3DRS_TWOSIDEDSTENCILMODE]) {
#if 0 /* Don't use OpenGL 2.0 calls for now */
if(GL_EXTCALL(glStencilFuncSeparate)) { if(GL_EXTCALL(glStencilFuncSeparate)) {
GL_EXTCALL(glStencilFuncSeparate(GL_BACK, func, ref, mask)); GL_EXTCALL(glStencilFuncSeparate(GL_BACK, func, ref, mask));
checkGLcall("glStencilFuncSeparate(GL_BACK,...)"); checkGLcall("glStencilFuncSeparate(GL_BACK,...)");
} }
else if(GL_SUPPORT(EXT_STENCIL_TWO_SIDE)) { else
#endif
if(GL_SUPPORT(EXT_STENCIL_TWO_SIDE)) {
glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT); glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT);
checkGLcall("glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT)"); checkGLcall("glEnable(GL_STENCIL_TEST_TWO_SIDE_EXT)");
GL_EXTCALL(glActiveStencilFaceEXT(GL_BACK)); GL_EXTCALL(glActiveStencilFaceEXT(GL_BACK));
......
...@@ -1237,7 +1237,9 @@ typedef enum _GL_SupportedExt { ...@@ -1237,7 +1237,9 @@ typedef enum _GL_SupportedExt {
/* GL_ATI_separate_stencil */ \ /* GL_ATI_separate_stencil */ \
USE_GL_FUNC(PGLFNSTENCILOPSEPARATEATIPROC, glStencilOpSeparateATI); \ USE_GL_FUNC(PGLFNSTENCILOPSEPARATEATIPROC, glStencilOpSeparateATI); \
USE_GL_FUNC(PGLFNSTENCILFUNCSEPARATEATIPROC, glStencilFuncSeparateATI); \ USE_GL_FUNC(PGLFNSTENCILFUNCSEPARATEATIPROC, glStencilFuncSeparateATI); \
/* GL_VERSION_2_0 */ \
/* OpenGL 2.0 functions */
#define GL2_FUNCS_GEN \
USE_GL_FUNC(PGLFNBLENDEQUATIONSEPARATEPROC, glBlendEquationSeparate); \ USE_GL_FUNC(PGLFNBLENDEQUATIONSEPARATEPROC, glBlendEquationSeparate); \
USE_GL_FUNC(PGLFNDRAWBUFFERSPROC, glDrawBuffers); \ USE_GL_FUNC(PGLFNDRAWBUFFERSPROC, glDrawBuffers); \
USE_GL_FUNC(PGLFNSTENCILOPSEPARATEPROC, glStencilOpSeparate); \ USE_GL_FUNC(PGLFNSTENCILOPSEPARATEPROC, glStencilOpSeparate); \
...@@ -1388,6 +1390,8 @@ typedef struct _WineD3D_GL_Info { ...@@ -1388,6 +1390,8 @@ typedef struct _WineD3D_GL_Info {
GL_EXT_FUNCS_GEN; GL_EXT_FUNCS_GEN;
/** OpenGL GLX functions ptr */ /** OpenGL GLX functions ptr */
GLX_EXT_FUNCS_GEN; GLX_EXT_FUNCS_GEN;
/** OpenGL 2.0 functions ptr */
/* GL2_FUNCS_GEN; */
/**/ /**/
} WineD3D_GL_Info; } WineD3D_GL_Info;
#undef USE_GL_FUNC #undef USE_GL_FUNC
......
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