wined3d: Only set GL_SHADER_OPERATION_NV to GL_NONE for supported units.

This commit is contained in:
H. Verbeet 2007-07-01 23:41:15 +02:00 committed by Alexandre Julliard
parent 9ed84211c1
commit 25c673225b

View file

@ -1707,7 +1707,7 @@ static void tex_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, WineD3D
glDisable(GL_TEXTURE_CUBE_MAP_ARB);
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
}
if(GL_SUPPORT(NV_TEXTURE_SHADER2)) {
if(GL_SUPPORT(NV_TEXTURE_SHADER2) && mapped_stage < GL_LIMITS(textures)) {
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE);
}
}