From c6e63f3cc235b2d7b06664a493584671a2493045 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 15 Feb 2010 18:04:00 -0700 Subject: progs/redbook: use glew --- progs/redbook/minmax.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'progs/redbook/minmax.c') diff --git a/progs/redbook/minmax.c b/progs/redbook/minmax.c index 6ff97e9121c..da5b875a475 100644 --- a/progs/redbook/minmax.c +++ b/progs/redbook/minmax.c @@ -45,6 +45,7 @@ * Determine the minimum and maximum values of a group of pixels. * This demonstrates use of the glMinmax() call. */ +#include #include #include #include @@ -108,6 +109,11 @@ readImage( const char* filename, GLsizei* width, GLsizei *height ) static void init(void) { + if (!glutExtensionSupported("GL_ARB_imaging")) { + fprintf(stderr, "Sorry, this program requires GL_ARB_imaging.\n"); + exit(1); + } + glPixelStorei(GL_UNPACK_ALIGNMENT, 1); glClearColor(0.0, 0.0, 0.0, 0.0); @@ -160,6 +166,7 @@ int main(int argc, char** argv) glutInitWindowSize(width, height); glutInitWindowPosition(100, 100); glutCreateWindow(argv[0]); + glewInit(); init(); glutReshapeFunc(reshape); glutKeyboardFunc(keyboard); -- cgit v1.2.3