Commit 7522edb1 authored by Thomas Debesse's avatar Thomas Debesse

Merge branch 'picomodel-obj-surface-vertexes' into 'master'

Fix over allocating vertexes for OBJ models with multiple surfaces

See merge request !107
parents e6694e8d 3705dcfe
...@@ -524,8 +524,9 @@ static picoModel_t *_obj_load( PM_PARAMS_LOAD ){ ...@@ -524,8 +524,9 @@ static picoModel_t *_obj_load( PM_PARAMS_LOAD ){
newSurface = PicoNewSurface( model ); \ newSurface = PicoNewSurface( model ); \
if ( newSurface == NULL ) { \ if ( newSurface == NULL ) { \
_obj_error_return( "Error allocating surface" ); } \ _obj_error_return( "Error allocating surface" ); } \
/* reset face index for surface */ \ /* reset face index and vertex index for surface */ \
curFace = 0; \ curFace = 0; \
curVertex = 0; \
/* if we can, assign the previous shader to this surface */ \ /* if we can, assign the previous shader to this surface */ \
if ( curSurface ) { \ if ( curSurface ) { \
PicoSetSurfaceShader( newSurface, curSurface->shader ); } \ PicoSetSurfaceShader( newSurface, curSurface->shader ); } \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment