goat3d

diff goatview/src/main.c @ 46:9d911100935b

added install/uninstall targets in goatview added load statistics in goatview
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 08 Dec 2013 03:00:25 +0200
parents f5fdefbb7a1d
children
line diff
     1.1 --- a/goatview/src/main.c	Sun Dec 08 02:27:32 2013 +0200
     1.2 +++ b/goatview/src/main.c	Sun Dec 08 03:00:25 2013 +0200
     1.3 @@ -22,6 +22,8 @@
     1.4  
     1.5  int main(int argc, char **argv)
     1.6  {
     1.7 +	int i, nmeshes;
     1.8 +
     1.9  	glutInitWindowSize(800, 600);
    1.10  	glutInit(&argc, argv);
    1.11  
    1.12 @@ -40,6 +42,16 @@
    1.13  		return 1;
    1.14  	}
    1.15  
    1.16 +	nmeshes = goat3d_get_mesh_count(goat);
    1.17 +	printf("loaded %d meshes\n", nmeshes);
    1.18 +	for(i=0; i<nmeshes; i++) {
    1.19 +		struct goat3d_mesh *m = goat3d_get_mesh(goat, i);
    1.20 +
    1.21 +		printf("- mesh[%d]: %s (%d verts, %d faces)\n", i, goat3d_get_mesh_name(m),
    1.22 +				goat3d_get_mesh_attrib_count(m, GOAT3D_MESH_ATTR_VERTEX),
    1.23 +				goat3d_get_mesh_face_count(m));
    1.24 +	}
    1.25 +
    1.26  	glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
    1.27  	glutCreateWindow(argv[1]);
    1.28