mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Fix failure to free cache for non-shadowed stuff (lightning, grenades, etc).
Also a minor speedup (only mess with glHints once per frame, instead of dozens of times).
This commit is contained in:
parent
c764ddc64a
commit
e78bdb3ea6
3 changed files with 9 additions and 15 deletions
|
@ -434,8 +434,8 @@ R_DrawAliasModel (entity_t *e, qboolean cull)
|
|||
VectorAdd (e->origin, clmodel->mins, mins);
|
||||
VectorAdd (e->origin, clmodel->maxs, maxs);
|
||||
|
||||
if (cull && R_CullBox (mins, maxs))
|
||||
return;
|
||||
if (cull && R_CullBox (mins, maxs))
|
||||
return;
|
||||
|
||||
VectorCopy (e->origin, r_entorigin);
|
||||
VectorSubtract (r_origin, r_entorigin, modelorg);
|
||||
|
@ -518,9 +518,6 @@ R_DrawAliasModel (entity_t *e, qboolean cull)
|
|||
|
||||
qfglBindTexture (GL_TEXTURE_2D, texture);
|
||||
|
||||
if (gl_affinemodels->int_val)
|
||||
qfglHint (GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
||||
|
||||
vo = GL_GetAliasFrameVerts (e->frame, paliashdr, e);
|
||||
|
||||
GL_DrawAliasFrame (vo, false);
|
||||
|
@ -531,16 +528,10 @@ R_DrawAliasModel (entity_t *e, qboolean cull)
|
|||
GL_DrawAliasFrame (vo, true);
|
||||
}
|
||||
|
||||
if (gl_affinemodels->int_val)
|
||||
qfglHint (GL_PERSPECTIVE_CORRECTION_HINT, GL_DONT_CARE);
|
||||
|
||||
qfglPopMatrix ();
|
||||
|
||||
if (r_shadows->int_val) {
|
||||
// torches, grenades, and lightning bolts do not have shadows
|
||||
if (!clmodel->shadow_alpha)
|
||||
return;
|
||||
|
||||
// torches, grenades, and lightning bolts do not have shadows
|
||||
if (r_shadows->int_val && clmodel->shadow_alpha) {
|
||||
qfglPushMatrix ();
|
||||
R_RotateForEntity (e);
|
||||
|
||||
|
|
|
@ -116,8 +116,7 @@ R_DrawSpriteModel (entity_t *e)
|
|||
mspriteframe_t *frame;
|
||||
vec3_t point, v_forward, v_right, v_up;
|
||||
|
||||
// don't even bother culling, because it's just a single
|
||||
// polygon without a surface cache
|
||||
// don't bother culling, it's just a single polygon without a surface cache
|
||||
frame = R_GetSpriteFrame (e);
|
||||
psprite = e->model->cache.data;
|
||||
|
||||
|
|
|
@ -182,6 +182,8 @@ R_DrawEntitiesOnList (void)
|
|||
R_DrawBrushModel (currententity);
|
||||
}
|
||||
|
||||
if (gl_affinemodels->int_val)
|
||||
qfglHint (GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
||||
for (i = 0; i < r_numvisedicts; i++) {
|
||||
if (r_visedicts[i]->model->type != mod_alias)
|
||||
continue;
|
||||
|
@ -192,6 +194,8 @@ R_DrawEntitiesOnList (void)
|
|||
|
||||
R_DrawAliasModel (currententity, true);
|
||||
}
|
||||
if (gl_affinemodels->int_val)
|
||||
qfglHint (GL_PERSPECTIVE_CORRECTION_HINT, GL_DONT_CARE);
|
||||
|
||||
qfglColor3ubv (color_white);
|
||||
qfglEnable (GL_ALPHA_TEST);
|
||||
|
|
Loading…
Reference in a new issue