libresman
diff examples/imgthumbs/src/main.c @ 11:bebc065a941f
doesn't work yet
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 07 Feb 2014 07:50:02 +0200 |
parents | 410c19c735b2 |
children | 0a789208498d |
line diff
1.1 --- a/examples/imgthumbs/src/main.c Wed Feb 05 02:01:49 2014 +0200 1.2 +++ b/examples/imgthumbs/src/main.c Fri Feb 07 07:50:02 2014 +0200 1.3 @@ -1,6 +1,7 @@ 1.4 #include <stdio.h> 1.5 #include <stdlib.h> 1.6 #include <assert.h> 1.7 +#include <imago2.h> 1.8 #include "opengl.h" 1.9 #include "resman.h" 1.10 #include "thumbs.h" 1.11 @@ -17,7 +18,6 @@ 1.12 static struct thumbnail *find_thumb(int x, int y); 1.13 1.14 const char *path = "."; 1.15 -struct resman *texman; 1.16 int win_width, win_height; 1.17 float win_aspect; 1.18 float pan_x, pan_y; 1.19 @@ -40,6 +40,7 @@ 1.20 glutCreateWindow("imgthumbs"); 1.21 1.22 glutDisplayFunc(display); 1.23 + glutIdleFunc(glutPostRedisplay); 1.24 glutReshapeFunc(reshape); 1.25 glutKeyboardFunc(keyb); 1.26 glutMouseFunc(mouse); 1.27 @@ -68,6 +69,8 @@ 1.28 1.29 static void display(void) 1.30 { 1.31 + update_thumbs(); 1.32 + 1.33 glClear(GL_COLOR_BUFFER_BIT); 1.34 1.35 glMatrixMode(GL_MODELVIEW);