A color state fix
Something that I forgot in the shader definition
This commit is contained in:
parent
85733f2d54
commit
ac92225a7e
1 changed files with 11 additions and 1 deletions
12
gl_bumpgf.c
12
gl_bumpgf.c
|
@ -606,6 +606,8 @@ void GF3_drawTriangleListBase (vertexdef_t *verts, int *indecies, int numIndecie
|
||||||
//Con_Printf("Cullstuff %s\n",shader->name);
|
//Con_Printf("Cullstuff %s\n",shader->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glColor3ub(255,255,255);
|
||||||
|
|
||||||
for (i=0; i<shader->numstages; i++) {
|
for (i=0; i<shader->numstages; i++) {
|
||||||
GF3_SetupSimpleStage(&shader->stages[i]);
|
GF3_SetupSimpleStage(&shader->stages[i]);
|
||||||
glDrawElements(GL_TRIANGLES,numIndecies,GL_UNSIGNED_INT,indecies);
|
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);
|
GL_SelectTexture(GL_TEXTURE1_ARB);
|
||||||
glEnable(GL_TEXTURE_2D);
|
glEnable(GL_TEXTURE_2D);
|
||||||
GL_Bind(lightmap_textures+lightmapIndex);
|
GL_Bind(lightmap_textures+lightmapIndex);
|
||||||
|
|
||||||
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
|
qglClientActiveTextureARB(GL_TEXTURE0_ARB);
|
||||||
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
|
glTexCoordPointer(2, GL_FLOAT, verts->texcoordstride, verts->texcoords);
|
||||||
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||||
|
@ -795,6 +796,15 @@ void GF3_drawTriangleListBase (vertexdef_t *verts, int *indecies, int numIndecie
|
||||||
|
|
||||||
glDisableClientState(GL_COLOR_ARRAY);
|
glDisableClientState(GL_COLOR_ARRAY);
|
||||||
} else if (shader->flags & SURF_PPLIGHT) {
|
} 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);
|
glColor3f(0,0,0);
|
||||||
glDisable(GL_TEXTURE_2D);
|
glDisable(GL_TEXTURE_2D);
|
||||||
glDrawElements(GL_TRIANGLES,numIndecies,GL_UNSIGNED_INT,indecies);
|
glDrawElements(GL_TRIANGLES,numIndecies,GL_UNSIGNED_INT,indecies);
|
||||||
|
|
Loading…
Reference in a new issue