Skip to content

Commit 82e0aa9

Browse files
committed
Add comments to tell which fields in srfGeneric_t are valid
1 parent f19588e commit 82e0aa9

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

src/engine/renderer/tr_local.h

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,27 +1735,31 @@ enum class ssaoMode {
17351735

17361736
// ydnar: plain map drawsurfaces must match this header
17371737
struct srfGeneric_t {
1738+
// v Valid in: SF_FACE, SF_GRID, SF_TRIANGLES, SF_VBO_MESH
17381739
surfaceType_t surfaceType;
17391740

17401741
// Culling information
17411742
vec3_t bounds[2];
17421743
vec3_t origin;
17431744
float radius;
17441745

1745-
cplane_t plane;
1746-
1747-
int numVerts;
1748-
srfVert_t* verts;
1749-
1750-
int numTriangles;
1751-
srfTriangle_t* triangles;
1752-
17531746
// Static render data
17541747
VBO_t* vbo;
17551748
IBO_t* ibo;
17561749

17571750
// BSP VBO offset
17581751
int firstIndex;
1752+
// ^ Valid in: SF_FACE, SF_GRID, SF_TRIANGLES, SF_VBO_MESH
1753+
1754+
cplane_t plane; // Valid in: SF_FACE, SF_TRIANGLES
1755+
1756+
int numVerts; // Valid in: SF_FACE, SF_GRID, SF_TRIANGLES, SF_VBO_MESH
1757+
srfVert_t* verts; // Valid in: SF_FACE, SF_GRID, SF_TRIANGLES
1758+
1759+
// v Valid in: SF_FACE, SF_GRID, SF_TRIANGLES
1760+
int numTriangles;
1761+
srfTriangle_t* triangles;
1762+
// ^ Valid in: SF_FACE, SF_GRID, SF_TRIANGLES
17591763
};
17601764

17611765
struct srfGridMesh_t : srfGeneric_t {

0 commit comments

Comments
 (0)