mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-29 16:24:16 +00:00
ref_soft: Fix TRIANGLE_STRIP draw
This commit is contained in:
parent
870ae030ca
commit
224bf07930
19
r_triapi.c
19
r_triapi.c
@ -244,23 +244,14 @@ void TriVertex3f( float x, float y, float z )
|
|||||||
}
|
}
|
||||||
if( mode == TRI_TRIANGLE_STRIP )
|
if( mode == TRI_TRIANGLE_STRIP )
|
||||||
{
|
{
|
||||||
R_SetupFinalVert( &triv[vertcount], x, y, z, 0,0,0);
|
if( vertcount > 2 )
|
||||||
vertcount++;
|
|
||||||
if( vertcount == 3 )
|
|
||||||
{
|
{
|
||||||
|
R_SetupFinalVert( &triv[(vertcount + 1) & 1 + 1], x, y, z, 0,0,0);
|
||||||
R_RenderTriangle( triv );
|
R_RenderTriangle( triv );
|
||||||
finalvert_t fv = triv[0];
|
|
||||||
|
|
||||||
triv[0] = triv[2];
|
|
||||||
triv[2] = fv;
|
|
||||||
R_RenderTriangle( triv );
|
|
||||||
fv = triv[0];
|
|
||||||
triv[0] = triv[2];
|
|
||||||
triv[2] = fv;
|
|
||||||
triv[0] = triv[1];
|
|
||||||
triv[1] = triv[2];
|
|
||||||
vertcount = 2;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
R_SetupFinalVert( &triv[vertcount], x, y, z, 0,0,0);
|
||||||
|
vertcount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user