goat3dgfx
diff src/scene.cc @ 28:0b863938da04
I don't remember
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 01 Mar 2014 22:37:49 +0200 |
parents | d9c8cd19c606 |
children |
line diff
1.1 --- a/src/scene.cc Thu Feb 27 02:19:16 2014 +0200 1.2 +++ b/src/scene.cc Sat Mar 01 22:37:49 2014 +0200 1.3 @@ -40,6 +40,7 @@ 1.4 return false; 1.5 } 1.6 1.7 + // load all the meshes 1.8 int num_meshes = goat3d_get_mesh_count(goat); 1.9 for(int i=0; i<num_meshes; i++) { 1.10 goat3d_mesh *gmesh = goat3d_get_mesh(goat, i); 1.11 @@ -49,6 +50,12 @@ 1.12 } 1.13 } 1.14 1.15 + // load all the nodes recursively 1.16 + int num_nodes = goat3d_get_node_count(goat); 1.17 + for(int i=0; i<num_nodes; i++) { 1.18 + goat3d_node *gnode = goat3d_get_node(goat, i); 1.19 + } 1.20 + 1.21 goat3d_free(goat); 1.22 return true; 1.23 } 1.24 @@ -64,6 +71,7 @@ 1.25 objects[i]->draw(msec); 1.26 } 1.27 1.28 + // if there are no objects in the scene, just draw the meshes instead 1.29 if(objects.empty()) { 1.30 for(size_t i=0; i<meshes.size(); i++) { 1.31 meshes[i]->draw();