goat3d
changeset 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 | 8da36540e2e9 |
children | 498ca7ac7047 |
files | goatview/Makefile goatview/src/main.c |
diffstat | 2 files changed, 22 insertions(+), 0 deletions(-) [+] |
line diff
1.1 --- a/goatview/Makefile Sun Dec 08 02:27:32 2013 +0200 1.2 +++ b/goatview/Makefile Sun Dec 08 03:00:25 2013 +0200 1.3 @@ -1,3 +1,5 @@ 1.4 +PREFIX = /usr/local 1.5 + 1.6 src = $(wildcard src/*.c) 1.7 obj = $(src:.c=.o) 1.8 dep = $(obj:.o=.d) 1.9 @@ -33,3 +35,11 @@ 1.10 .PHONY: cleandep 1.11 cleandep: 1.12 rm -f $(dep) 1.13 + 1.14 +.PHONY: install 1.15 +install: $(bin) 1.16 + cp $(bin) $(DESTDIR)$(PREFIX)/bin/$(bin) 1.17 + 1.18 +.PHONY: uninstall 1.19 +uninstall: 1.20 + rm -f $(DESTDIR)$(PREFIX)/bin/$(bin)
2.1 --- a/goatview/src/main.c Sun Dec 08 02:27:32 2013 +0200 2.2 +++ b/goatview/src/main.c Sun Dec 08 03:00:25 2013 +0200 2.3 @@ -22,6 +22,8 @@ 2.4 2.5 int main(int argc, char **argv) 2.6 { 2.7 + int i, nmeshes; 2.8 + 2.9 glutInitWindowSize(800, 600); 2.10 glutInit(&argc, argv); 2.11 2.12 @@ -40,6 +42,16 @@ 2.13 return 1; 2.14 } 2.15 2.16 + nmeshes = goat3d_get_mesh_count(goat); 2.17 + printf("loaded %d meshes\n", nmeshes); 2.18 + for(i=0; i<nmeshes; i++) { 2.19 + struct goat3d_mesh *m = goat3d_get_mesh(goat, i); 2.20 + 2.21 + printf("- mesh[%d]: %s (%d verts, %d faces)\n", i, goat3d_get_mesh_name(m), 2.22 + goat3d_get_mesh_attrib_count(m, GOAT3D_MESH_ATTR_VERTEX), 2.23 + goat3d_get_mesh_face_count(m)); 2.24 + } 2.25 + 2.26 glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE); 2.27 glutCreateWindow(argv[1]); 2.28