A color state fix

Something that I forgot in the shader definition
This commit is contained in:
cholleme 2003-06-29 21:57:40 +00:00
parent 85733f2d54
commit ac92225a7e

View file

@ -606,6 +606,8 @@ void GF3_drawTriangleListBase (vertexdef_t *verts, int *indecies, int numIndecie
//Con_Printf("Cullstuff %s\n",shader->name);
}
glColor3ub(255,255,255);
for (i=0; i<shader->numstages; i++) {
GF3_SetupSimpleStage(&shader->stages[i]);
glDrawElements(GL_TRIANGLES,numIndecies,GL_UNSIGNED_INT,indecies);
@ -742,7 +744,6 @@ void GF3_drawTriangleListBase (vertexdef_t *verts, int *indecies, int numIndecie
GL_SelectTexture(GL_TEXTURE1_ARB);
glEnable(GL_TEXTURE_2D);
GL_Bind(lightmap_textures+lightmapIndex);
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
@ -795,6 +796,15 @@ void GF3_drawTriangleListBase (vertexdef_t *verts, int *indecies, int numIndecie
glDisableClientState(GL_COLOR_ARRAY);
} else if (shader->flags & SURF_PPLIGHT) {
//No colors no lightmap
if (shader->colorstages[0].src_blend >= 0) {
glBlendFunc(shader->colorstages[0].src_blend, shader->colorstages[0].dst_blend);
glEnable(GL_BLEND);
} else {
glDisable(GL_BLEND);
}
glColor3f(0,0,0);
glDisable(GL_TEXTURE_2D);
glDrawElements(GL_TRIANGLES,numIndecies,GL_UNSIGNED_INT,indecies);