[iortcw] 254/497: All: Rend2: Ensure tess VAO is bound before using it
Simon McVittie
smcv at debian.org
Fri Sep 8 10:37:02 UTC 2017
This is an automated email from the git hooks/post-receive script.
smcv pushed a commit to annotated tag 1.42d
in repository iortcw.
commit c21d5d2af22381b5c096f4256c6b150fbfde4b47
Author: M4N4T4RMS at gmail.com <M4N4T4RMS at gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date: Sat Nov 22 00:56:28 2014 +0000
All: Rend2: Ensure tess VAO is bound before using it
---
MP/code/rend2/tr_surface.c | 12 ++++++++++++
SP/code/rend2/tr_surface.c | 12 ++++++++++++
2 files changed, 24 insertions(+)
diff --git a/MP/code/rend2/tr_surface.c b/MP/code/rend2/tr_surface.c
index 19c036b..df76ec9 100644
--- a/MP/code/rend2/tr_surface.c
+++ b/MP/code/rend2/tr_surface.c
@@ -97,6 +97,8 @@ void RB_AddQuadStampExt( vec3_t origin, vec3_t left, vec3_t up, float color[4],
uint32_t pNormal;
int ndx;
+ RB_CheckVao(tess.vao);
+
RB_CHECKOVERFLOW( 4, 6 );
ndx = tess.numVertexes;
@@ -655,6 +657,8 @@ static void DoRailCore( const vec3_t start, const vec3_t end, const vec3_t up, f
int vbase;
float t = len / 256.0f;
+ RB_CheckVao(tess.vao);
+
RB_CHECKOVERFLOW( 4, 6 );
vbase = tess.numVertexes;
@@ -736,6 +740,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++ )
{
int j;
@@ -1251,6 +1257,8 @@ static void RB_SurfaceMesh(mdvSurface_t *surface) {
backlerp = backEnd.currentEntity->e.backlerp;
}
+ RB_CheckVao(tess.vao);
+
RB_CHECKOVERFLOW( surface->numVerts, surface->numIndexes );
LerpMeshVertexes( surface, backlerp );
@@ -1470,6 +1478,8 @@ void RB_SurfaceCMesh( mdcSurface_t *surface ) {
backlerp = backEnd.currentEntity->e.backlerp;
}
+ RB_CheckVao(tess.vao);
+
RB_CHECKOVERFLOW( surface->numVerts, surface->numTriangles * 3 );
LerpCMeshVertexes( surface, backlerp );
@@ -1579,6 +1589,8 @@ static void RB_SurfaceGrid( srfBspSurface_t *srf ) {
return;
}
+ RB_CheckVao(tess.vao);
+
dlightBits = srf->dlightBits;
tess.dlightBits |= dlightBits;
diff --git a/SP/code/rend2/tr_surface.c b/SP/code/rend2/tr_surface.c
index 085a555..cbd2040 100644
--- a/SP/code/rend2/tr_surface.c
+++ b/SP/code/rend2/tr_surface.c
@@ -97,6 +97,8 @@ void RB_AddQuadStampExt( vec3_t origin, vec3_t left, vec3_t up, float color[4],
uint32_t pNormal;
int ndx;
+ RB_CheckVao(tess.vao);
+
RB_CHECKOVERFLOW( 4, 6 );
ndx = tess.numVertexes;
@@ -653,6 +655,8 @@ static void DoRailCore( const vec3_t start, const vec3_t end, const vec3_t up, f
int vbase;
float t = len / 256.0f;
+ RB_CheckVao(tess.vao);
+
RB_CHECKOVERFLOW( 4, 6 );
vbase = tess.numVertexes;
@@ -734,6 +738,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++ )
{
int j;
@@ -1249,6 +1255,8 @@ static void RB_SurfaceMesh(mdvSurface_t *surface) {
backlerp = backEnd.currentEntity->e.backlerp;
}
+ RB_CheckVao(tess.vao);
+
RB_CHECKOVERFLOW( surface->numVerts, surface->numIndexes );
LerpMeshVertexes( surface, backlerp );
@@ -1468,6 +1476,8 @@ void RB_SurfaceCMesh( mdcSurface_t *surface ) {
backlerp = backEnd.currentEntity->e.backlerp;
}
+ RB_CheckVao(tess.vao);
+
RB_CHECKOVERFLOW( surface->numVerts, surface->numTriangles * 3 );
LerpCMeshVertexes( surface, backlerp );
@@ -1576,6 +1586,8 @@ static void RB_SurfaceGrid( srfBspSurface_t *srf ) {
return;
}
+ RB_CheckVao(tess.vao);
+
dlightBits = srf->dlightBits;
tess.dlightBits |= dlightBits;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/iortcw.git
More information about the Pkg-games-commits
mailing list