From 2ee9568b18dcacc2d9a774b3bac98ef1682fdeec Mon Sep 17 00:00:00 2001 From: divverent Date: Thu, 17 Jun 2010 21:53:45 +0000 Subject: [PATCH] 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 --- gl_rmain.c | 4 ++++ 1 file changed, 4 insertions(+) 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; -- 2.39.2