omni360 / lib3ds

Automatically exported from code.google.com/p/lib3ds
GNU Lesser General Public License v2.1
0 stars 0 forks source link

I find a bug in 3dsplay.cpp code #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I find a bug in demo code "3dsplay.cpp"

in function 
static void render_node(Lib3dsNode *node) 
{
...

#ifdef USE_SDL
                    Player_texture *pt = NULL;
                    int tex_mode = 0;
#endif
                    if (mesh->faces[p].material > 0) {
                        mat = file->materials[mesh->faces[p].material];
                    }

...
}

I think "if (mesh->faces[p].material > 0) " should to "if 
(mesh->faces[p].material >= 0) " 

if use ">", it could not use first material in 3ds file.

Original issue reported on code.google.com by avens...@gmail.com on 10 May 2011 at 9:38