mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-02 22:11:22 +00:00
Revert r968, optimization in R_DrawSequentialPoly. Going to try a deeper change that uses the world drawing code for bmodels.
git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@978 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
f11ef51b2f
commit
890fe165e8
1 changed files with 0 additions and 49 deletions
|
@ -483,41 +483,6 @@ void R_DrawSequentialPoly (msurface_t *s)
|
|||
if (s->flags & SURF_DRAWFENCE)
|
||||
glDisable (GL_ALPHA_TEST); // Flip alpha test back off
|
||||
|
||||
fullbrights:
|
||||
return; // ericw - optimization: moved to a separate pass through the polys
|
||||
// so we're not constantly thrashing the texture bound in TEXTURE0
|
||||
}
|
||||
|
||||
/*
|
||||
================
|
||||
R_DrawSequentialPoly_Fullbrights -- ericw - moved from R_DrawSequentialPoly
|
||||
================
|
||||
*/
|
||||
void R_DrawSequentialPoly_Fullbrights (msurface_t *s)
|
||||
{
|
||||
texture_t *t;
|
||||
float entalpha;
|
||||
|
||||
t = R_TextureAnimation (s->texinfo->texture, currententity->frame);
|
||||
entalpha = ENTALPHA_DECODE(currententity->alpha);
|
||||
|
||||
// drawflat
|
||||
if (r_drawflat_cheatsafe)
|
||||
return;
|
||||
|
||||
// fullbright
|
||||
if ((r_fullbright_cheatsafe) && !(s->flags & SURF_DRAWTILED))
|
||||
goto fullbrights;
|
||||
|
||||
// other cases
|
||||
if (r_lightmap_cheatsafe
|
||||
|| s->flags & SURF_DRAWSKY
|
||||
|| s->flags & SURF_DRAWTURB
|
||||
|| s->flags & SURF_NOTEXTURE)
|
||||
return;
|
||||
|
||||
// lightmapped poly
|
||||
|
||||
fullbrights:
|
||||
if (gl_fullbrights.value && t->fullbright)
|
||||
{
|
||||
|
@ -623,20 +588,6 @@ void R_DrawBrushModel (entity_t *e)
|
|||
}
|
||||
}
|
||||
|
||||
// ericw -- second pass to draw the fullbrights
|
||||
|
||||
psurf = &clmodel->surfaces[clmodel->firstmodelsurface];
|
||||
for (i=0 ; i<clmodel->nummodelsurfaces ; i++, psurf++)
|
||||
{
|
||||
pplane = psurf->plane;
|
||||
dot = DotProduct (modelorg, pplane->normal) - pplane->dist;
|
||||
if (((psurf->flags & SURF_PLANEBACK) && (dot < -BACKFACE_EPSILON)) ||
|
||||
(!(psurf->flags & SURF_PLANEBACK) && (dot > BACKFACE_EPSILON)))
|
||||
{
|
||||
R_DrawSequentialPoly_Fullbrights (psurf);
|
||||
}
|
||||
}
|
||||
|
||||
if (r_drawflat_cheatsafe) //johnfitz
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
|
||||
|
|
Loading…
Reference in a new issue