fix juddery flickery lerpy models.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@4294 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
ebbb9bd149
commit
694f36a615
2 changed files with 25 additions and 18 deletions
|
@ -1508,6 +1508,7 @@ qboolean Alias_GAliasBuildMesh(mesh_t *mesh, vbo_t **vbop, galiasinfo_t *inf, in
|
||||||
mesh->normals_array = meshcache.anorm;
|
mesh->normals_array = meshcache.anorm;
|
||||||
mesh->snormals_array = meshcache.anorms;
|
mesh->snormals_array = meshcache.anorms;
|
||||||
mesh->tnormals_array = meshcache.anormt;
|
mesh->tnormals_array = meshcache.anormt;
|
||||||
|
if (vbop)
|
||||||
*vbop = meshcache.vbop;
|
*vbop = meshcache.vbop;
|
||||||
|
|
||||||
#ifdef SKELETALMODELS
|
#ifdef SKELETALMODELS
|
||||||
|
@ -1539,7 +1540,9 @@ qboolean Alias_GAliasBuildMesh(mesh_t *mesh, vbo_t **vbop, galiasinfo_t *inf, in
|
||||||
|
|
||||||
#ifdef SKELETALMODELS
|
#ifdef SKELETALMODELS
|
||||||
meshcache.usebonepose = NULL;
|
meshcache.usebonepose = NULL;
|
||||||
*vbop = meshcache.vbop = NULL;
|
meshcache.vbop = NULL;
|
||||||
|
if (vbop)
|
||||||
|
*vbop = NULL;
|
||||||
if (inf->ofs_skel_xyz && !inf->ofs_skel_weight)
|
if (inf->ofs_skel_xyz && !inf->ofs_skel_weight)
|
||||||
{
|
{
|
||||||
//if we have skeletal xyz info, but no skeletal weights, then its a partial model that cannot possibly be animated.
|
//if we have skeletal xyz info, but no skeletal weights, then its a partial model that cannot possibly be animated.
|
||||||
|
@ -1550,6 +1553,8 @@ qboolean Alias_GAliasBuildMesh(mesh_t *mesh, vbo_t **vbop, galiasinfo_t *inf, in
|
||||||
mesh->snormals_array = (vec3_t*)((char*)inf + inf->ofs_skel_svect);
|
mesh->snormals_array = (vec3_t*)((char*)inf + inf->ofs_skel_svect);
|
||||||
mesh->tnormals_array = (vec3_t*)((char*)inf + inf->ofs_skel_tvect);
|
mesh->tnormals_array = (vec3_t*)((char*)inf + inf->ofs_skel_tvect);
|
||||||
|
|
||||||
|
if (vbop)
|
||||||
|
{
|
||||||
meshcache.vbo.indicies = inf->vboindicies;
|
meshcache.vbo.indicies = inf->vboindicies;
|
||||||
meshcache.vbo.indexcount = inf->numindexes;
|
meshcache.vbo.indexcount = inf->numindexes;
|
||||||
meshcache.vbo.vertcount = inf->numverts;
|
meshcache.vbo.vertcount = inf->numverts;
|
||||||
|
@ -1564,6 +1569,7 @@ qboolean Alias_GAliasBuildMesh(mesh_t *mesh, vbo_t **vbop, galiasinfo_t *inf, in
|
||||||
if (meshcache.vbo.indicies.dummy)
|
if (meshcache.vbo.indicies.dummy)
|
||||||
*vbop = meshcache.vbop = &meshcache.vbo;
|
*vbop = meshcache.vbop = &meshcache.vbo;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else if (inf->numbones)
|
else if (inf->numbones)
|
||||||
{
|
{
|
||||||
mesh->xyz2_array = NULL;
|
mesh->xyz2_array = NULL;
|
||||||
|
@ -1713,7 +1719,7 @@ qboolean Alias_GAliasBuildMesh(mesh_t *mesh, vbo_t **vbop, galiasinfo_t *inf, in
|
||||||
mesh->xyz2_array = (vecV_t *)((char *)p2 + p2->ofsverts);
|
mesh->xyz2_array = (vecV_t *)((char *)p2 + p2->ofsverts);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (meshcache.vbo.indicies.dummy)
|
if (vbop && meshcache.vbo.indicies.dummy)
|
||||||
*vbop = meshcache.vbop = &meshcache.vbo;
|
*vbop = meshcache.vbop = &meshcache.vbo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1723,6 +1729,7 @@ qboolean Alias_GAliasBuildMesh(mesh_t *mesh, vbo_t **vbop, galiasinfo_t *inf, in
|
||||||
meshcache.anorm = mesh->normals_array;
|
meshcache.anorm = mesh->normals_array;
|
||||||
meshcache.anorms = mesh->snormals_array;
|
meshcache.anorms = mesh->snormals_array;
|
||||||
meshcache.anormt = mesh->tnormals_array;
|
meshcache.anormt = mesh->tnormals_array;
|
||||||
|
if (vbop)
|
||||||
meshcache.vbop = *vbop;
|
meshcache.vbop = *vbop;
|
||||||
|
|
||||||
#ifdef SKELETALMODELS
|
#ifdef SKELETALMODELS
|
||||||
|
|
|
@ -3506,7 +3506,7 @@ static void DrawMeshes(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (shaderstate.sourcevbo->coord2.gl.addr)
|
if (shaderstate.sourcevbo->coord2.gl.addr && (shaderstate.curshader->numdeforms || !shaderstate.curshader->prog))
|
||||||
GenerateVertexBlends(shaderstate.curshader);
|
GenerateVertexBlends(shaderstate.curshader);
|
||||||
else if (shaderstate.curshader->numdeforms)
|
else if (shaderstate.curshader->numdeforms)
|
||||||
GenerateVertexDeforms(shaderstate.curshader);
|
GenerateVertexDeforms(shaderstate.curshader);
|
||||||
|
|
Loading…
Reference in a new issue