OpenGL2: Remove srfTriangle_t, and use glIndex_t instead.
This commit is contained in:
parent
d295db747c
commit
ef9fe17dd5
8 changed files with 173 additions and 235 deletions
|
@ -269,7 +269,7 @@ int R_MarkFragments( int numPoints, const vec3_t *points, const vec3_t projectio
|
|||
int numClipPoints;
|
||||
float *v;
|
||||
srfBspSurface_t *cv;
|
||||
srfTriangle_t *tri;
|
||||
glIndex_t *tri;
|
||||
srfVert_t *dv;
|
||||
vec3_t normal;
|
||||
vec3_t projectionDir;
|
||||
|
@ -414,11 +414,11 @@ int R_MarkFragments( int numPoints, const vec3_t *points, const vec3_t projectio
|
|||
continue;
|
||||
}
|
||||
|
||||
for(k = 0, tri = surf->triangles; k < surf->numTriangles; k++, tri++)
|
||||
for(k = 0, tri = surf->indexes; k < surf->numIndexes; k += 3, tri += 3)
|
||||
{
|
||||
for(j = 0; j < 3; j++)
|
||||
{
|
||||
v = surf->verts[tri->indexes[j]].xyz;
|
||||
v = surf->verts[tri[j]].xyz;
|
||||
VectorMA(v, MARKER_OFFSET, surf->cullPlane.normal, clipPoints[0][j]);
|
||||
}
|
||||
|
||||
|
@ -437,12 +437,12 @@ int R_MarkFragments( int numPoints, const vec3_t *points, const vec3_t projectio
|
|||
|
||||
srfBspSurface_t *surf = (srfBspSurface_t *) surfaces[i];
|
||||
|
||||
for(k = 0, tri = surf->triangles; k < surf->numTriangles; k++, tri++)
|
||||
for(k = 0, tri = surf->indexes; k < surf->numIndexes; k += 3, tri += 3)
|
||||
{
|
||||
for(j = 0; j < 3; j++)
|
||||
{
|
||||
v = surf->verts[tri->indexes[j]].xyz;
|
||||
VectorMA(v, MARKER_OFFSET, surf->verts[tri->indexes[j]].normal, clipPoints[0][j]);
|
||||
v = surf->verts[tri[j]].xyz;
|
||||
VectorMA(v, MARKER_OFFSET, surf->verts[tri[j]].normal, clipPoints[0][j]);
|
||||
}
|
||||
|
||||
// add the fragments of this face
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue