diff options
Diffstat (limited to 'src/samples/quad.c')
-rw-r--r-- | src/samples/quad.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/samples/quad.c b/src/samples/quad.c index 193850ab..8171d765 100644 --- a/src/samples/quad.c +++ b/src/samples/quad.c @@ -25,14 +25,10 @@ #include <stdio.h> #include <string.h> #include <stdlib.h> +#include <GL/glew.h> #include <GL/glut.h> -#ifndef CALLBACK -#define CALLBACK -#endif - - #define PI 3.141592654 #define BLACK 0 #define GRAY 128 @@ -96,14 +92,12 @@ GLubyte brickImage[4*brickImageWidth*brickImageHeight] = { char *texFileName = 0; -static void CALLBACK ErrorHandler(GLenum which) +static void GLAPIENTRY ErrorHandler(GLenum which) { fprintf(stderr, "Quad Error: %s\n", (char *) gluErrorString(which)); } -typedef void (GLAPIENTRY *callback_t)(); - static void Init(void) { static GLint colorIndexes[3] = {0, 200, 255}; @@ -165,7 +159,7 @@ static void Init(void) } quadObj = gluNewQuadric(); - gluQuadricCallback(quadObj, GLU_ERROR, (callback_t) ErrorHandler); + gluQuadricCallback(quadObj, GLU_ERROR, (_GLUfuncptr) ErrorHandler); radius1 = 10; radius2 = 5; |