Browse Source

Use catPrim and addPrims to add the tessellated quads to the OT in a slightly more efficient fashion.

master
Nico de Poel 3 years ago
parent
commit
5ecf96428d
  1. 8
      draw.h

8
draw.h

@ -534,7 +534,6 @@ static INLINE void draw_quadstrip_tess2(const ps1bsp_vertex_t *vertices, const p
blitVert(p0, 2, tmp[1]);
blitVert(p0, 3, tmp[4]);
setPolyGT4(p0);
addPrim(ot, p0);
// Second quad
p1 = (POLY_GT4*)mem_prim(sizeof(POLY_GT4));
@ -545,7 +544,7 @@ static INLINE void draw_quadstrip_tess2(const ps1bsp_vertex_t *vertices, const p
blitVert(p1, 2, tmp[2]);
blitVert(p1, 3, tmp[5]);
setPolyGT4(p1);
addPrim(ot, p1);
catPrim(p0, p1);
// Third quad
p2 = (POLY_GT4*)mem_prim(sizeof(POLY_GT4));
@ -556,7 +555,7 @@ static INLINE void draw_quadstrip_tess2(const ps1bsp_vertex_t *vertices, const p
blitVert(p2, 2, tmp[4]);
blitVert(p2, 3, tmp[7]);
setPolyGT4(p2);
addPrim(ot, p2);
catPrim(p1, p2);
// Fourth quad
p3 = (POLY_GT4*)mem_prim(sizeof(POLY_GT4));
@ -567,8 +566,9 @@ static INLINE void draw_quadstrip_tess2(const ps1bsp_vertex_t *vertices, const p
blitVert(p3, 2, tmp[5]);
blitVert(p3, 3, tmp[8]);
setPolyGT4(p3);
addPrim(ot, p3);
catPrim(p2, p3);
addPrims(ot, p0, p3);
polyCount += 4;
}
}

Loading…
Cancel
Save