From 4c32ad64cf14220f8c3302a08f270712678e3b19 Mon Sep 17 00:00:00 2001 From: "divverent divverent@d7cf8633-e32d-0410-b094-e92efae38249" <> Date: Fri, 9 Jul 2010 17:21:51 +0000 Subject: [PATCH] UNMERGE cleanup mempool use when generating a shadow mesh (one instance that used "loadmodel->mempool" that shouldn't) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@10276 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::unmerge=a19a4d85d2b64f05334d015c6ccbe5c61166243a --- model_shared.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/model_shared.c b/model_shared.c index 37bae978..cd01781c 100644 --- a/model_shared.c +++ b/model_shared.c @@ -1187,7 +1187,7 @@ shadowmesh_t *Mod_ShadowMesh_Begin(mempool_t *mempool, int maxverts, int maxtria return Mod_ShadowMesh_Alloc(mempool, maxverts, maxtriangles, map_diffuse, map_specular, map_normal, light, neighbors, expandable); } -static void Mod_ShadowMesh_CreateVBOs(shadowmesh_t *mesh, mempool_t *mempool) +static void Mod_ShadowMesh_CreateVBOs(shadowmesh_t *mesh) { if (!mesh->numverts) return; @@ -1199,7 +1199,7 @@ static void Mod_ShadowMesh_CreateVBOs(shadowmesh_t *mesh, mempool_t *mempool) int vertexindex; int numvertices = mesh->numverts; r_vertexmesh_t *vertexmesh; - mesh->vertexmesh = vertexmesh = (r_vertexmesh_t*)Mem_Alloc(mempool, numvertices * sizeof(*mesh->vertexmesh)); + mesh->vertexmesh = vertexmesh = (r_vertexmesh_t*)Mem_Alloc(loadmodel->mempool, numvertices * sizeof(*mesh->vertexmesh)); for (vertexindex = 0;vertexindex < numvertices;vertexindex++, vertexmesh++) { VectorCopy(mesh->vertex3f + 3*vertexindex, vertexmesh->vertex3f); @@ -1282,7 +1282,7 @@ shadowmesh_t *Mod_ShadowMesh_Finish(mempool_t *mempool, shadowmesh_t *firstmesh, newmesh->element3s[i] = newmesh->element3i[i]; } if (createvbo) - Mod_ShadowMesh_CreateVBOs(newmesh, mempool); + Mod_ShadowMesh_CreateVBOs(newmesh); } Mem_Free(mesh); } -- 2.39.2