From 890fe165e839120996f1053817877fe4364cd571 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Fri, 29 Aug 2014 08:27:16 +0000 Subject: [PATCH] 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 --- Quake/r_brush.c | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/Quake/r_brush.c b/Quake/r_brush.c index 7d519b00..ac6fa4d8 100644 --- a/Quake/r_brush.c +++ b/Quake/r_brush.c @@ -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 ; inummodelsurfaces ; 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);