diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index b89207ebf44..ab8e9caea95 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -479,8 +479,10 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i)); checkGLcall("glActiveTextureARB"); - glDisable(GL_TEXTURE_CUBE_MAP_ARB); - checkGLcall("glDisable GL_TEXTURE_CUBE_MAP_ARB"); + if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) { + glDisable(GL_TEXTURE_CUBE_MAP_ARB); + checkGLcall("glDisable GL_TEXTURE_CUBE_MAP_ARB"); + } glDisable(GL_TEXTURE_3D); checkGLcall("glDisable GL_TEXTURE_3D"); glDisable(GL_TEXTURE_2D); @@ -497,8 +499,10 @@ static inline void SetupForBlit(IWineD3DDeviceImpl *This, WineD3DContext *contex GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB)); checkGLcall("glActiveTextureARB"); } - glDisable(GL_TEXTURE_CUBE_MAP_ARB); - checkGLcall("glDisable GL_TEXTURE_CUBE_MAP_ARB"); + if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) { + glDisable(GL_TEXTURE_CUBE_MAP_ARB); + checkGLcall("glDisable GL_TEXTURE_CUBE_MAP_ARB"); + } glDisable(GL_TEXTURE_3D); checkGLcall("glDisable GL_TEXTURE_3D"); glDisable(GL_TEXTURE_1D); diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 8e563fb045e..12ef9286409 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1552,14 +1552,18 @@ static void activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock) case GL_TEXTURE_2D: glDisable(GL_TEXTURE_3D); checkGLcall("glDisable(GL_TEXTURE_3D)"); - glDisable(GL_TEXTURE_CUBE_MAP_ARB); - checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)"); + if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) { + glDisable(GL_TEXTURE_CUBE_MAP_ARB); + checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)"); + } glEnable(GL_TEXTURE_2D); checkGLcall("glEnable(GL_TEXTURE_2D)"); break; case GL_TEXTURE_3D: - glDisable(GL_TEXTURE_CUBE_MAP_ARB); - checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)"); + if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) { + glDisable(GL_TEXTURE_CUBE_MAP_ARB); + checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)"); + } glDisable(GL_TEXTURE_2D); checkGLcall("glDisable(GL_TEXTURE_2D)"); glEnable(GL_TEXTURE_3D); @@ -1579,8 +1583,10 @@ static void activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock) checkGLcall("glDisable(GL_TEXTURE_2D)"); glDisable(GL_TEXTURE_3D); checkGLcall("glDisable(GL_TEXTURE_3D)"); - glDisable(GL_TEXTURE_CUBE_MAP_ARB); - checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)"); + if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) { + glDisable(GL_TEXTURE_CUBE_MAP_ARB); + checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)"); + } glEnable(GL_TEXTURE_1D); checkGLcall("glEnable(GL_TEXTURE_1D)"); /* 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 checkGLcall("glDisable(GL_TEXTURE_2D)"); glDisable(GL_TEXTURE_3D); checkGLcall("glDisable(GL_TEXTURE_3D)"); - glDisable(GL_TEXTURE_CUBE_MAP_ARB); - checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)"); + if(GL_SUPPORT(ARB_TEXTURE_CUBE_MAP)) { + glDisable(GL_TEXTURE_CUBE_MAP_ARB); + checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)"); + } } /* All done */ return;