projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'mesa_7_5_branch'
[mesa.git]
/
progs
/
demos
/
arbocclude.c
diff --git
a/progs/demos/arbocclude.c
b/progs/demos/arbocclude.c
index ddbb1f1b759bb37b19ec8b75d2d805e449be8fa9..9188ad5a5658743c1fb3e3edaaffe0dd004e8f74 100644
(file)
--- a/
progs/demos/arbocclude.c
+++ b/
progs/demos/arbocclude.c
@@
-29,7
+29,7
@@
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#
define GL_GLEXT_PROTOTYPES
+#
include <GL/glew.h>
#include <GL/glut.h>
#define TEST_DISPLAY_LISTS 0
#include <GL/glut.h>
#define TEST_DISPLAY_LISTS 0
@@
-37,7
+37,7
@@
static GLboolean Anim = GL_TRUE;
static GLfloat Xpos = 0;
static GLuint OccQuery;
static GLboolean Anim = GL_TRUE;
static GLfloat Xpos = 0;
static GLuint OccQuery;
-
+static GLint Win = 0;
static void
static void
@@
-204,6
+204,7
@@
static void Key( unsigned char key, int x, int y )
(void) y;
switch (key) {
case 27:
(void) y;
switch (key) {
case 27:
+ glutDestroyWindow(Win);
exit(0);
break;
case ' ':
exit(0);
break;
case ' ':
@@
-271,7
+272,8
@@
int main( int argc, char *argv[] )
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 400, 400 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 400, 400 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
- glutCreateWindow(argv[0]);
+ Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );