mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 03:51:18 +00:00
Fix over allocating vertexes for OBJ models with multiple surfaces
Loading Wavefront OBJ models in picomodel (used by radiant and q3map2) did not reset the surface vertex index when starting a new surface. This caused there to be unused vertexes, equal to the number of vertexes in all previous surfaces, at the beginning of each surface. Exponential OBJ vertex memory usage as number of surfaces increases. It did not affect displaying or processing the surface faces.
This commit is contained in:
parent
44edaa14a6
commit
7110342987
1 changed files with 2 additions and 1 deletions
|
@ -652,8 +652,9 @@ static picoModel_t *_obj_load( PM_PARAMS_LOAD ){
|
|||
_obj_error_return( "Error allocating surface" );
|
||||
}
|
||||
|
||||
/* reset face index for surface */
|
||||
/* reset face index and vertex index for surface */
|
||||
curFace = 0;
|
||||
curVertex = 0;
|
||||
|
||||
/* set ptr to current surface */
|
||||
curSurface = newSurface;
|
||||
|
|
Loading…
Reference in a new issue