wined3d: Opengl 2.x compile fix.
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index dd72818..7d8e4f2c 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3767,8 +3767,12 @@
         }
 
         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 @@
         }
         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 * 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 @@
     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 **/ \