mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-22 20:11:44 +00:00
Fixed off-by-one that'll totally fix model issues, especially on OpenBSD.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@5506 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
07ac8fd047
commit
3d55513a48
1 changed files with 5 additions and 5 deletions
|
@ -935,7 +935,7 @@ void GLBE_RenderShadowBuffer(unsigned int numverts, int vbo, vecV_t *verts, unsi
|
|||
shaderstate.lastuniform = shaderstate.allblackshader.glsl.handle;
|
||||
|
||||
GL_SelectEBO(ibo);
|
||||
qglDrawRangeElements(GL_TRIANGLES, 0, numverts, numindicies, GL_INDEX_TYPE, indicies);
|
||||
qglDrawRangeElements(GL_TRIANGLES, 0, numverts - 1, numindicies, GL_INDEX_TYPE, indicies);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -944,7 +944,7 @@ void GLBE_RenderShadowBuffer(unsigned int numverts, int vbo, vecV_t *verts, unsi
|
|||
|
||||
//draw cached world shadow mesh
|
||||
GL_SelectEBO(ibo);
|
||||
qglDrawRangeElements(GL_TRIANGLES, 0, numverts, numindicies, GL_INDEX_TYPE, indicies);
|
||||
qglDrawRangeElements(GL_TRIANGLES, 0, numverts - 1, numindicies, GL_INDEX_TYPE, indicies);
|
||||
}
|
||||
RQuantAdd(RQUANT_DRAWS, 1);
|
||||
RQuantAdd(RQUANT_SHADOWINDICIES, numindicies);
|
||||
|
@ -3105,7 +3105,7 @@ static void BE_SubmitMeshChain(qboolean usetesselation)
|
|||
{
|
||||
GL_SelectEBO(shaderstate.sourcevbo->indicies.gl.vbo);
|
||||
mesh = shaderstate.meshes[0];
|
||||
qglDrawRangeElements(batchtype, mesh->vbofirstvert, mesh->vbofirstvert+mesh->numvertexes, mesh->numindexes, GL_INDEX_TYPE, (index_t*)shaderstate.sourcevbo->indicies.gl.addr + mesh->vbofirstelement);
|
||||
qglDrawRangeElements(batchtype, mesh->vbofirstvert, mesh->vbofirstvert+mesh->numvertexes - 1, mesh->numindexes, GL_INDEX_TYPE, (index_t*)shaderstate.sourcevbo->indicies.gl.addr + mesh->vbofirstelement);
|
||||
RQuantAdd(RQUANT_DRAWS, 1);
|
||||
RQuantAdd(RQUANT_PRIMITIVEINDICIES, mesh->numindexes);
|
||||
return;
|
||||
|
@ -3140,7 +3140,7 @@ static void BE_SubmitMeshChain(qboolean usetesselation)
|
|||
for (starti = 0; starti < mesh->numindexes; )
|
||||
ilst[endi++] = mesh->vbofirstvert + mesh->indexes[starti++];
|
||||
}
|
||||
qglDrawRangeElements(batchtype, startv, endv, endi, GL_INDEX_TYPE, ilst);
|
||||
qglDrawRangeElements(batchtype, startv, endv - 1, endi, GL_INDEX_TYPE, ilst);
|
||||
RQuantAdd(RQUANT_DRAWS, 1);
|
||||
RQuantAdd(RQUANT_PRIMITIVEINDICIES, endi);
|
||||
}
|
||||
|
@ -3263,7 +3263,7 @@ static void BE_SubmitMeshChain(qboolean usetesselation)
|
|||
break;
|
||||
}
|
||||
}
|
||||
qglDrawRangeElements(batchtype, startv, endv, endi-starti, GL_INDEX_TYPE, (index_t*)shaderstate.sourcevbo->indicies.gl.addr + starti);
|
||||
qglDrawRangeElements(batchtype, startv, endv - 1, endi-starti, GL_INDEX_TYPE, (index_t*)shaderstate.sourcevbo->indicies.gl.addr + starti);
|
||||
RQuantAdd(RQUANT_DRAWS, 1);
|
||||
RQuantAdd(RQUANT_PRIMITIVEINDICIES, endi-starti);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue