From: divverent Date: Thu, 17 Jun 2010 21:53:45 +0000 (+0000) Subject: optimize away NOP wave functions in one more case X-Git-Tag: xonotic-v0.1.0preview~230^2~240 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=2ee9568b18dcacc2d9a774b3bac98ef1682fdeec;p=xonotic%2Fdarkplaces.git optimize away NOP wave functions in one more case git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10238 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/gl_rmain.c b/gl_rmain.c index fc88e5bb..f3e6702a 100644 --- a/gl_rmain.c +++ b/gl_rmain.c @@ -10175,6 +10175,8 @@ void RSurf_PrepareVerticesForBatch(int batchneed, int texturenumsurfaces, const needsupdate |= BATCHNEED_VERTEXMESH_NORMAL | BATCHNEED_VERTEXMESH_VECTOR; break; case Q3DEFORM_WAVE: + if(!R_TestQ3WaveFunc(deform->wavefunc, deform->waveparms)) + break; // if wavefunc is a nop, ignore this transform batchneed |= BATCHNEED_ARRAY_VERTEX | BATCHNEED_ARRAY_NORMAL | BATCHNEED_ARRAY_TEXCOORD | BATCHNEED_NOGAPS; needsupdate |= BATCHNEED_VERTEXPOSITION | BATCHNEED_VERTEXMESH_VERTEX | BATCHNEED_VERTEXMESH_NORMAL | BATCHNEED_VERTEXMESH_VECTOR; break; @@ -10183,6 +10185,8 @@ void RSurf_PrepareVerticesForBatch(int batchneed, int texturenumsurfaces, const needsupdate |= BATCHNEED_VERTEXPOSITION | BATCHNEED_VERTEXMESH_VERTEX | BATCHNEED_VERTEXMESH_NORMAL | BATCHNEED_VERTEXMESH_VECTOR; break; case Q3DEFORM_MOVE: + if(!R_TestQ3WaveFunc(deform->wavefunc, deform->waveparms)) + break; // if wavefunc is a nop, ignore this transform batchneed |= BATCHNEED_ARRAY_VERTEX | BATCHNEED_NOGAPS; needsupdate |= BATCHNEED_VERTEXPOSITION | BATCHNEED_VERTEXMESH_VERTEX; break;