diff noise reductions + fix what looks to be a bug with surf flushing

This commit is contained in:
Bill Currie 2001-05-16 17:20:42 +00:00
parent 8f4394de4f
commit 35a52bb634
2 changed files with 20 additions and 20 deletions

View file

@ -30,12 +30,15 @@
# include "config.h"
#endif
#include "client.h"
#include "QF/sound.h"
#include "client.h" //XXX goes with cl_entities
#include "d_ifacea.h"
#include "r_local.h"
#include "render.h"
#if 0
// FIXME
FIXME
the complex cases add new polys on most lines, so dont optimize for
keeping them the same have multiple free span lists to try to get better
coherence ? low depth complexity-- 1 to 3 or so this breaks spans at every
@ -43,6 +46,7 @@
have a sentinal at both ends ?
#endif
edge_t *auxedges;
edge_t *r_edges, *edge_p, *edge_max;
@ -76,7 +80,6 @@ float fv;
void R_GenerateSpans (void);
void R_GenerateSpansBackward (void);
void R_LeadingEdge (edge_t *edge);
void R_LeadingEdgeBackwards (edge_t *edge);
void R_TrailingEdge (surf_t *surf, edge_t *edge);
@ -123,7 +126,7 @@ R_BeginEdgeFrame (void)
edge_max = &r_edges[r_numallocatededges];
surface_p = &surfaces[2]; // background is surface 1,
// surface 0 is a dummy
// surface 0 is a dummy
surfaces[1].spans = NULL; // no background spans yet
surfaces[1].flags = SURF_DRAWBACKGROUND;
@ -321,8 +324,8 @@ R_LeadingEdgeBackwards (edge_t *edge)
if (!surf->insubmodel)
goto continue_search;
// must be two bmodels in the same leaf; don't care which is really
// in front, because they'll never be farthest anyway
// must be two bmodels in the same leaf; don't care which is
// really in front, because they'll never be farthest anyway
}
goto gotposition;
@ -399,8 +402,9 @@ R_LeadingEdge (edge_t *edge)
// it's adding a new surface in, so find the correct place
surf = &surfaces[edge->surfs[1]];
// don't start a span if this is an inverted span, with the end edge
// preceding the start edge (that is, we've already seen the end edge)
// don't start a span if this is an inverted span, with the end
// edge preceding the start edge (that is, we've already seen the
// end edge)
if (++surf->spanstate == 1) {
if (surf->insubmodel)
r_bmodelactive++;
@ -442,8 +446,8 @@ R_LeadingEdge (edge_t *edge)
if (surf->key == surf2->key) {
// if it's two surfaces on the same plane, the one that's
// already
// active is in front, so keep going unless it's a bmodel
// already active is in front, so keep going unless it's a
// bmodel
if (!surf->insubmodel)
goto continue_search;
@ -624,10 +628,9 @@ R_ScanEdges (void)
// flush the span list if we can't be sure we have enough spans left
// for the next scan
if (span_p >= max_span_p) {
if (span_p > max_span_p) {
VID_UnlockBuffer ();
S_ExtraUpdate (); // don't let sound get messed up if
// going slow
S_ExtraUpdate (); // don't let sound get messed up if going slow
VID_LockBuffer ();
if (r_drawculledpolys)

View file

@ -38,10 +38,10 @@
#if 0
FIXME
the complex cases add new polys on most lines,
so dont optimize for keeping them the same have multiple free span lists to
try to get better coherence ? low depth complexity-- 1 to 3 or so this
breaks spans at every edge, even hidden ones (bad)
the complex cases add new polys on most lines, so dont optimize for
keeping them the same have multiple free span lists to try to get better
coherence ? low depth complexity-- 1 to 3 or so this breaks spans at every
edge, even hidden ones (bad)
have a sentinal at both ends ?
#endif
@ -501,9 +501,6 @@ R_LeadingEdge (edge_t *edge)
}
/*
R_GenerateSpans
*/
void
R_GenerateSpans (void)
{