From: echon Date: Tue, 8 Sep 2009 15:59:10 +0000 (+0000) Subject: NULL out RSurf_ActiveModelEntity rsurface fields that aren't wanted with an animcache... X-Git-Tag: xonotic-v0.1.0preview~1463 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=1849860b5ad4180f3c822dbe57bb58c0888bd9fe;p=xonotic%2Fdarkplaces.git NULL out RSurf_ActiveModelEntity rsurface fields that aren't wanted with an animcached entity. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9169 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index 3cc4e746..52a10187 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -2760,7 +2760,7 @@ void R_RunAnimCache(void) // FIXME: Some stable way of determining if normals/tangets aren't going to be needed would be good for optimizing this // Need to consider deformvertexes and tcgens that need normals and/or tangents (otherwise they'll slow-path generate them later), as well as some rendering settings bWantNormals = true; - bWantTangents = bWantNormals && (r_glsl.integer && gl_support_fragment_shader); + bWantTangents = true;//bWantNormals && (r_glsl.integer && gl_support_fragment_shader); model->AnimateVertices( model, ent->frameblend, r_animCache[cacheIdx].vertexes, @@ -5282,9 +5282,9 @@ void RSurf_ActiveModelEntity(const entity_render_t *ent, qboolean wantnormals, q if (ent->animcacheindex != 0) { rsurface.modelvertex3f = r_animCache[ent->animcacheindex-1].vertexes; - rsurface.modelsvector3f = r_animCache[ent->animcacheindex-1].sVectors; - rsurface.modeltvector3f = r_animCache[ent->animcacheindex-1].tVectors; - rsurface.modelnormal3f = r_animCache[ent->animcacheindex-1].normals; + rsurface.modelsvector3f = wanttangents ? r_animCache[ent->animcacheindex-1].sVectors : NULL; + rsurface.modeltvector3f = wanttangents ? r_animCache[ent->animcacheindex-1].tVectors : NULL; + rsurface.modelnormal3f = wantnormals ? r_animCache[ent->animcacheindex-1].normals : NULL; } else if (wanttangents) {