wined3d: Fix the indentation in tex_coordindex().

The indentation here is pretty horrible. Also removes a couple of fairly
useless comments.
This commit is contained in:
Henri Verbeet 2009-03-25 10:12:26 +01:00 committed by Alexandre Julliard
parent 8255dde127
commit f63313fe3e

View File

@ -3118,13 +3118,11 @@ static void tex_coordindex(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
* state. We do not (yet) support the WINED3DRENDERSTATE_WRAPx values, nor tie them up
* to the TEXCOORDINDEX value
*/
/*
* Be careful the value of the mask 0xF0000 come from d3d8types.h infos
*/
switch (stateblock->textureState[stage][WINED3DTSS_TEXCOORDINDEX] & 0xFFFF0000) {
switch (stateblock->textureState[stage][WINED3DTSS_TEXCOORDINDEX] & 0xffff0000)
{
case WINED3DTSS_TCI_PASSTHRU:
/*Use the specified texture coordinates contained within the vertex format. This value resolves to zero.*/
/* Use the specified texture coordinates contained within the
* vertex format. This value resolves to zero. */
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
glDisable(GL_TEXTURE_GEN_R);
@ -3135,9 +3133,7 @@ static void tex_coordindex(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
case WINED3DTSS_TCI_CAMERASPACEPOSITION:
/* CameraSpacePosition means use the vertex position, transformed to camera space,
* as the input texture coordinates for this stage's texture transformation. This
* equates roughly to EYE_LINEAR
*/
{
* equates roughly to EYE_LINEAR */
TRACE("WINED3DTSS_TCI_CAMERASPACEPOSITION - Set eye plane\n");
glMatrixMode(GL_MODELVIEW);
@ -3162,12 +3158,14 @@ static void tex_coordindex(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
checkGLcall("glEnable(GL_TEXTURE_GEN_R)");
glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR);
checkGLcall("glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_EYE_LINEAR)");
}
break;
case WINED3DTSS_TCI_CAMERASPACENORMAL:
if (!GL_SUPPORT(NV_TEXGEN_REFLECTION))
{
if (GL_SUPPORT(NV_TEXGEN_REFLECTION)) {
break;
}
TRACE("WINED3DTSS_TCI_CAMERASPACENORMAL - Set eye plane\n");
glMatrixMode(GL_MODELVIEW);
@ -3191,13 +3189,15 @@ static void tex_coordindex(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
checkGLcall("glEnable(GL_TEXTURE_GEN_R)");
glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV);
checkGLcall("glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_NORMAL_MAP_NV)");
}
}
break;
case WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR:
if (!GL_SUPPORT(NV_TEXGEN_REFLECTION))
{
if (GL_SUPPORT(NV_TEXGEN_REFLECTION)) {
break;
}
TRACE("WINED3DTSS_TCI_CAMERASPACEREFLECTIONVECTOR - Set eye plane\n");
glMatrixMode(GL_MODELVIEW);
@ -3221,14 +3221,10 @@ static void tex_coordindex(DWORD state, IWineD3DStateBlockImpl *stateblock, Wine
checkGLcall("glEnable(GL_TEXTURE_GEN_R)");
glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_NV);
checkGLcall("glTexGeni(GL_R, GL_TEXTURE_GEN_MODE, GL_REFLECTION_MAP_NV)");
}
}
break;
/* Unhandled types: */
default:
/* Todo: */
/* ? disable GL_TEXTURE_GEN_n ? */
glDisable(GL_TEXTURE_GEN_S);
glDisable(GL_TEXTURE_GEN_T);
glDisable(GL_TEXTURE_GEN_R);