Commit 335f978e authored by Felix Nawothnig's avatar Felix Nawothnig Committed by Alexandre Julliard

wined3d: Only disable GL_TEXTURE_CUBE_MAP_ARB if supported.

parent fc1d30f6
...@@ -479,8 +479,10 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex ...@@ -479,8 +479,10 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i)); GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i));
checkGLcall("glActiveTextureARB"); checkGLcall("glActiveTextureARB");
glDisable(GL_TEXTURE_CUBE_MAP_ARB); if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) {
checkGLcall("glDisable GL_TEXTURE_CUBE_MAP_ARB"); glDisable(GL_TEXTURE_CUBE_MAP_ARB);
checkGLcall("glDisable GL_TEXTURE_CUBE_MAP_ARB");
}
glDisable(GL_TEXTURE_3D); glDisable(GL_TEXTURE_3D);
checkGLcall("glDisable GL_TEXTURE_3D"); checkGLcall("glDisable GL_TEXTURE_3D");
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
...@@ -497,8 +499,10 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex ...@@ -497,8 +499,10 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB)); GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB));
checkGLcall("glActiveTextureARB"); checkGLcall("glActiveTextureARB");
} }
glDisable(GL_TEXTURE_CUBE_MAP_ARB); if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) {
checkGLcall("glDisable GL_TEXTURE_CUBE_MAP_ARB"); glDisable(GL_TEXTURE_CUBE_MAP_ARB);
checkGLcall("glDisable GL_TEXTURE_CUBE_MAP_ARB");
}
glDisable(GL_TEXTURE_3D); glDisable(GL_TEXTURE_3D);
checkGLcall("glDisable GL_TEXTURE_3D"); checkGLcall("glDisable GL_TEXTURE_3D");
glDisable(GL_TEXTURE_1D); glDisable(GL_TEXTURE_1D);
......
...@@ -1552,14 +1552,18 @@ static void activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock) ...@@ -1552,14 +1552,18 @@ static void activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock)
case GL_TEXTURE_2D: case GL_TEXTURE_2D:
glDisable(GL_TEXTURE_3D); glDisable(GL_TEXTURE_3D);
checkGLcall("glDisable(GL_TEXTURE_3D)"); checkGLcall("glDisable(GL_TEXTURE_3D)");
glDisable(GL_TEXTURE_CUBE_MAP_ARB); if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) {
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)"); glDisable(GL_TEXTURE_CUBE_MAP_ARB);
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
}
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
checkGLcall("glEnable(GL_TEXTURE_2D)"); checkGLcall("glEnable(GL_TEXTURE_2D)");
break; break;
case GL_TEXTURE_3D: case GL_TEXTURE_3D:
glDisable(GL_TEXTURE_CUBE_MAP_ARB); if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) {
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)"); glDisable(GL_TEXTURE_CUBE_MAP_ARB);
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
}
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
checkGLcall("glDisable(GL_TEXTURE_2D)"); checkGLcall("glDisable(GL_TEXTURE_2D)");
glEnable(GL_TEXTURE_3D); glEnable(GL_TEXTURE_3D);
...@@ -1579,8 +1583,10 @@ static void activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock) ...@@ -1579,8 +1583,10 @@ static void activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock)
checkGLcall("glDisable(GL_TEXTURE_2D)"); checkGLcall("glDisable(GL_TEXTURE_2D)");
glDisable(GL_TEXTURE_3D); glDisable(GL_TEXTURE_3D);
checkGLcall("glDisable(GL_TEXTURE_3D)"); checkGLcall("glDisable(GL_TEXTURE_3D)");
glDisable(GL_TEXTURE_CUBE_MAP_ARB); if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) {
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)"); glDisable(GL_TEXTURE_CUBE_MAP_ARB);
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
}
glEnable(GL_TEXTURE_1D); glEnable(GL_TEXTURE_1D);
checkGLcall("glEnable(GL_TEXTURE_1D)"); checkGLcall("glEnable(GL_TEXTURE_1D)");
/* Binding textures is done by samplers. A dummy texture will be bound */ /* Binding textures is done by samplers. A dummy texture will be bound */
...@@ -1636,8 +1642,10 @@ static void tex_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D ...@@ -1636,8 +1642,10 @@ static void tex_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
checkGLcall("glDisable(GL_TEXTURE_2D)"); checkGLcall("glDisable(GL_TEXTURE_2D)");
glDisable(GL_TEXTURE_3D); glDisable(GL_TEXTURE_3D);
checkGLcall("glDisable(GL_TEXTURE_3D)"); checkGLcall("glDisable(GL_TEXTURE_3D)");
glDisable(GL_TEXTURE_CUBE_MAP_ARB); if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) {
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)"); glDisable(GL_TEXTURE_CUBE_MAP_ARB);
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
}
} }
/* All done */ /* All done */
return; return;
......
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