Merge pull request #13 from zturtleman/picomodel-obj-surface-vertexes

Fix over allocating vertexes for OBJ models with multiple surfaces
This commit is contained in:
Garux
2018-10-31 11:31:22 +03:00
committed by GitHub

View File

@@ -528,6 +528,7 @@ static picoModel_t *_obj_load( PM_PARAMS_LOAD ){
_obj_error_return( "Error allocating surface" ); } \
/* reset face index for surface */ \
curFace = 0; \
curVertex = 0; \
/* if we can, assign the previous shader to this surface */ \
if ( curSurface ) { \
PicoSetSurfaceShader( newSurface, curSurface->shader ); } \