mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-17 22:50:51 +00:00
Instead of glEnable/glDisable (GL_ALPHA_TEST) pairs for every sprite rendered, let's do it once for the entire sprite loop. Minor hit when there are no sprites, but 2+ it's a gain. Better worst case, rather than better peak performance.
This commit is contained in:
parent
63ac10dfde
commit
5e6f77cddb
1 changed files with 2 additions and 3 deletions
|
@ -202,7 +202,6 @@ R_DrawSpriteModel (entity_t *e)
|
|||
|
||||
qfglBindTexture (GL_TEXTURE_2D, frame->gl_texturenum);
|
||||
|
||||
qfglEnable (GL_ALPHA_TEST);
|
||||
qfglBegin (GL_QUADS);
|
||||
|
||||
qfglTexCoord2f (0, 1);
|
||||
|
@ -226,8 +225,6 @@ R_DrawSpriteModel (entity_t *e)
|
|||
qfglVertex3fv (point);
|
||||
|
||||
qfglEnd ();
|
||||
|
||||
qfglDisable (GL_ALPHA_TEST);
|
||||
}
|
||||
|
||||
/* ALIAS MODELS */
|
||||
|
@ -780,6 +777,7 @@ R_DrawEntitiesOnList (void)
|
|||
}
|
||||
qfglColor3ubv (color_white);
|
||||
|
||||
qfglEnable (GL_ALPHA_TEST);
|
||||
for (i = 0; i < r_numvisedicts; i++) {
|
||||
if (r_visedicts[i]->model->type != mod_sprite)
|
||||
continue;
|
||||
|
@ -788,6 +786,7 @@ R_DrawEntitiesOnList (void)
|
|||
|
||||
R_DrawSpriteModel (currententity);
|
||||
}
|
||||
qfglDisable (GL_ALPHA_TEST);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue