]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
UNMERGE
authordivverent divverent@d7cf8633-e32d-0410-b094-e92efae38249 <>
Tue, 31 Aug 2010 07:28:24 +0000 (07:28 +0000)
committerRudolf Polzer <divverent@alientrap.org>
Fri, 24 Sep 2010 20:00:23 +0000 (22:00 +0200)
get rid of calculating vertexmesh animcache buffers if we do not need the vertexmesh... fixes performance of steel storm

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10431 d7cf8633-e32d-0410-b094-e92efae38249
::stable-branch::unmerge=010f524039d1780063484288f9a832b473709a6b

gl_rmain.c

index 1d6571fd0864e64470184c90dcea619fd844bba1..5745f55becb8c2fac9850bfcc008a841d0145c89 100644 (file)
@@ -7761,52 +7761,14 @@ void R_AnimCache_ClearCache(void)
 void R_AnimCache_UpdateEntityMeshBuffers(entity_render_t *ent, int numvertices)
 {
        int i;
-
-       // identical memory layout, so no need to allocate...
-       // this also provides the vertexposition structure to everything, e.g.
-       // depth masked rendering currently uses it even if having separate
-       // arrays
-       // NOTE: get rid of this optimization if changing it to e.g. 4f
-       ent->animcache_vertexposition = (r_vertexposition_t *)ent->animcache_vertex3f;
-
-       // TODO:
-       // get rid of following uses of VERTEXPOSITION, change to the array:
-       // R_DrawTextureSurfaceList_Sky if skyrendermasked
-       // R_DrawSurface_TransparentCallback if r_transparentdepthmasking.integer
-       // R_DrawTextureSurfaceList_DepthOnly
-       // R_Q1BSP_DrawShadowMap
-
-       switch(vid.renderpath)
-       {
-       case RENDERPATH_GL20:
-       case RENDERPATH_CGGL:
-               // need the meshbuffers if !gl_mesh_separatearrays.integer
-               if (gl_mesh_separatearrays.integer)
-                       return;
-               break;
-       case RENDERPATH_D3D9:
-       case RENDERPATH_D3D10:
-       case RENDERPATH_D3D11:
-               // always need the meshbuffers
-               break;
-       case RENDERPATH_GL13:
-       case RENDERPATH_GL11:
-               // never need the meshbuffers
-               return;
-       }
-
        if (!ent->animcache_vertexmesh && ent->animcache_normal3f)
                ent->animcache_vertexmesh = (r_vertexmesh_t *)R_FrameData_Alloc(sizeof(r_vertexmesh_t)*numvertices);
-       /*
        if (!ent->animcache_vertexposition)
                ent->animcache_vertexposition = (r_vertexposition_t *)R_FrameData_Alloc(sizeof(r_vertexposition_t)*numvertices);
-       */
        if (ent->animcache_vertexposition)
        {
-               /*
                for (i = 0;i < numvertices;i++)
                        VectorCopy(ent->animcache_vertex3f + 3*i, ent->animcache_vertexposition[i].vertex3f);
-               */
                // TODO: upload vertex buffer?
        }
        if (ent->animcache_vertexmesh)