GL1 multitexture bugfix

With "hand 2" and no "alias" models in player sight, sometimes only
lightmap was visible. Now forcing disabled multitexture when needed.
Another bugfix: "gl_showbbox 1" no longer produces OpenGL errors.
This commit is contained in:
Jaime Moreira 2024-06-04 14:53:25 -04:00
parent 7ffcd990c4
commit c68ffec274
2 changed files with 5 additions and 6 deletions

View file

@ -409,6 +409,7 @@ R_DrawEntitiesOnList(void)
} }
glDepthMask(1); /* back to writing */ glDepthMask(1); /* back to writing */
R_EnableMultitexture(false);
} }
void void

View file

@ -825,14 +825,12 @@ R_DrawAliasModel(entity_t *currententity, const model_t *currentmodel)
glDisable(GL_CULL_FACE); glDisable(GL_CULL_FACE);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glDisable(GL_TEXTURE_2D); glDisable(GL_TEXTURE_2D);
glBegin(GL_TRIANGLE_STRIP);
for (i = 0; i < 8; i++) glEnableClientState(GL_VERTEX_ARRAY);
{ glVertexPointer(3, GL_FLOAT, 0, bbox);
glVertex3fv(bbox[i]); glDrawArrays(GL_TRIANGLE_STRIP, 0, 8);
} glDisableClientState(GL_VERTEX_ARRAY);
glEnd();
glEnable(GL_TEXTURE_2D); glEnable(GL_TEXTURE_2D);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
glEnable(GL_CULL_FACE); glEnable(GL_CULL_FACE);