mirror of
https://github.com/UberGames/lilium-voyager.git
synced 2024-12-14 06:01:10 +00:00
OpenGL2: Ensure tess VAO is bound before using it.
This commit is contained in:
parent
c787cf3aef
commit
fd23249357
1 changed files with 12 additions and 0 deletions
|
@ -91,6 +91,8 @@ void RB_AddQuadStampExt( vec3_t origin, vec3_t left, vec3_t up, float color[4],
|
||||||
uint32_t pNormal;
|
uint32_t pNormal;
|
||||||
int ndx;
|
int ndx;
|
||||||
|
|
||||||
|
RB_CheckVao(tess.vao);
|
||||||
|
|
||||||
RB_CHECKOVERFLOW( 4, 6 );
|
RB_CHECKOVERFLOW( 4, 6 );
|
||||||
|
|
||||||
ndx = tess.numVertexes;
|
ndx = tess.numVertexes;
|
||||||
|
@ -283,6 +285,8 @@ static void RB_SurfacePolychain( srfPoly_t *p ) {
|
||||||
int i;
|
int i;
|
||||||
int numv;
|
int numv;
|
||||||
|
|
||||||
|
RB_CheckVao(tess.vao);
|
||||||
|
|
||||||
RB_CHECKOVERFLOW( p->numVerts, 3*(p->numVerts - 2) );
|
RB_CHECKOVERFLOW( p->numVerts, 3*(p->numVerts - 2) );
|
||||||
|
|
||||||
// fan triangles into the tess array
|
// fan triangles into the tess array
|
||||||
|
@ -626,6 +630,8 @@ static void DoRailCore( const vec3_t start, const vec3_t end, const vec3_t up, f
|
||||||
int vbase;
|
int vbase;
|
||||||
float t = len / 256.0f;
|
float t = len / 256.0f;
|
||||||
|
|
||||||
|
RB_CheckVao(tess.vao);
|
||||||
|
|
||||||
RB_CHECKOVERFLOW( 4, 6 );
|
RB_CHECKOVERFLOW( 4, 6 );
|
||||||
|
|
||||||
vbase = tess.numVertexes;
|
vbase = tess.numVertexes;
|
||||||
|
@ -707,6 +713,8 @@ static void DoRailDiscs( int numSegs, const vec3_t start, const vec3_t dir, cons
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RB_CheckVao(tess.vao);
|
||||||
|
|
||||||
for ( i = 0; i < numSegs; i++ )
|
for ( i = 0; i < numSegs; i++ )
|
||||||
{
|
{
|
||||||
int j;
|
int j;
|
||||||
|
@ -1218,6 +1226,8 @@ static void RB_SurfaceMesh(mdvSurface_t *surface) {
|
||||||
backlerp = backEnd.currentEntity->e.backlerp;
|
backlerp = backEnd.currentEntity->e.backlerp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RB_CheckVao(tess.vao);
|
||||||
|
|
||||||
RB_CHECKOVERFLOW( surface->numVerts, surface->numIndexes );
|
RB_CHECKOVERFLOW( surface->numVerts, surface->numIndexes );
|
||||||
|
|
||||||
LerpMeshVertexes (surface, backlerp);
|
LerpMeshVertexes (surface, backlerp);
|
||||||
|
@ -1325,6 +1335,8 @@ static void RB_SurfaceGrid( srfBspSurface_t *srf ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RB_CheckVao(tess.vao);
|
||||||
|
|
||||||
dlightBits = srf->dlightBits;
|
dlightBits = srf->dlightBits;
|
||||||
tess.dlightBits |= dlightBits;
|
tess.dlightBits |= dlightBits;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue