summaryrefslogtreecommitdiffstats
path: root/progs
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-01-23 14:35:36 +0000
committerJosé Fonseca <[email protected]>2009-01-23 14:35:36 +0000
commit479ea7d87b6d283cd74d345cb618d69a889284d9 (patch)
tree30914b79b70473656b404d2d3700dda609c69688 /progs
parent57d00016cab9afa3e7853d9830044a8ece9541c4 (diff)
progs/trivial: Use glew where needed.
Builds on windows now.
Diffstat (limited to 'progs')
-rw-r--r--progs/SConstruct25
-rw-r--r--progs/trivial/Makefile2
-rw-r--r--progs/trivial/clear-fbo-tex.c4
-rw-r--r--progs/trivial/clear-fbo.c4
-rw-r--r--progs/trivial/drawarrays.c3
-rw-r--r--progs/trivial/drawelements.c3
-rw-r--r--progs/trivial/drawrange.c3
-rw-r--r--progs/trivial/lineloop-elts.c3
-rw-r--r--progs/trivial/long-fixed-func.c3
-rw-r--r--progs/trivial/point-param.c4
-rw-r--r--progs/trivial/quad-tex-3d.c3
-rw-r--r--progs/trivial/quad-tex-pbo.c4
-rw-r--r--progs/trivial/readpixels.c4
-rw-r--r--progs/trivial/tri-array-interleaved.c3
-rw-r--r--progs/trivial/tri-blend-color.c3
-rw-r--r--progs/trivial/tri-blend-max.c4
-rw-r--r--progs/trivial/tri-blend-min.c4
-rw-r--r--progs/trivial/tri-blend-revsub.c4
-rw-r--r--progs/trivial/tri-blend-sub.c4
-rw-r--r--progs/trivial/tri-fbo-tex.c3
-rw-r--r--progs/trivial/tri-fbo.c4
-rw-r--r--progs/trivial/tri-fp-const-imm.c4
-rw-r--r--progs/trivial/tri-fp.c4
-rw-r--r--progs/trivial/tri-query.c4
-rw-r--r--progs/trivial/tri-tex-3d.c3
-rw-r--r--progs/trivial/vbo-drawarrays.c3
-rw-r--r--progs/trivial/vbo-drawelements.c3
-rw-r--r--progs/trivial/vbo-drawrange.c3
-rw-r--r--progs/trivial/vp-array-int.c3
-rw-r--r--progs/trivial/vp-array.c3
-rw-r--r--progs/trivial/vp-clip.c3
-rw-r--r--progs/trivial/vp-line-clip.c3
-rw-r--r--progs/trivial/vp-tri-cb-pos.c6
-rw-r--r--progs/trivial/vp-tri-cb-tex.c4
-rw-r--r--progs/trivial/vp-tri-cb.c3
-rw-r--r--progs/trivial/vp-tri-imm.c3
-rw-r--r--progs/trivial/vp-tri-swap.c3
-rw-r--r--progs/trivial/vp-tri-tex.c3
-rw-r--r--progs/trivial/vp-tri.c3
-rw-r--r--progs/trivial/vp-unfilled.c3
40 files changed, 119 insertions, 39 deletions
diff --git a/progs/SConstruct b/progs/SConstruct
index ac5314fac57..bce48f72ff1 100644
--- a/progs/SConstruct
+++ b/progs/SConstruct
@@ -10,9 +10,23 @@ env = Environment(
# Use Mesa's headers and libs
-if 0:
+if 1:
+ build_topdir = 'build'
+ build_subdir = env['platform']
+ if env['machine'] != 'generic':
+ build_subdir += '-' + env['machine']
+ if env['debug']:
+ build_subdir += "-debug"
+ if env['profile']:
+ build_subdir += "-profile"
+ build_dir = os.path.join(build_topdir, build_subdir)
+
+ env.Append(CPPDEFINES = ['GLEW_STATIC'])
env.Append(CPPPATH = ['#../include'])
- env.Append(LIBPATH = ['#../lib'])
+ env.Append(LIBPATH = [
+ '#../' + build_dir + '/glew/',
+ '#../' + build_dir + '/glut/glx',
+ ])
conf = Configure(env)
@@ -32,6 +46,13 @@ if conf.CheckCHeader('GL/glut.h'):
env['GLUT_LIB'] = 'glut'
env['GLUT'] = True
+# GLEW
+env['GLEW'] = False
+if conf.CheckCHeader('GL/glew.h'):
+ env['GLEW_LIB'] = 'glew'
+ env['GLEW'] = True
+ env.Prepend(LIBS = ['glew'])
+
conf.Finish()
diff --git a/progs/trivial/Makefile b/progs/trivial/Makefile
index 2c158c8d49a..dce96f6bc8c 100644
--- a/progs/trivial/Makefile
+++ b/progs/trivial/Makefile
@@ -8,7 +8,7 @@ TOP = ../..
include $(TOP)/configs/current
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
+LIBS = -L$(TOP)/$(LIB_DIR) -l $(GLEW_LIB) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
SOURCES = \
clear-fbo-tex.c \
diff --git a/progs/trivial/clear-fbo-tex.c b/progs/trivial/clear-fbo-tex.c
index 68f1ab3d77e..eccfde5ae63 100644
--- a/progs/trivial/clear-fbo-tex.c
+++ b/progs/trivial/clear-fbo-tex.c
@@ -5,7 +5,7 @@
#include <math.h>
#include <string.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -210,6 +210,8 @@ main( int argc, char *argv[] )
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
diff --git a/progs/trivial/clear-fbo.c b/progs/trivial/clear-fbo.c
index 82218ed4985..64b25430c66 100644
--- a/progs/trivial/clear-fbo.c
+++ b/progs/trivial/clear-fbo.c
@@ -5,7 +5,7 @@
#include <math.h>
#include <string.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -195,6 +195,8 @@ main( int argc, char *argv[] )
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
diff --git a/progs/trivial/drawarrays.c b/progs/trivial/drawarrays.c
index 596eee9eef1..27d86682f75 100644
--- a/progs/trivial/drawarrays.c
+++ b/progs/trivial/drawarrays.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -118,6 +118,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/drawelements.c b/progs/trivial/drawelements.c
index e0c8e80b68c..4c115030afc 100644
--- a/progs/trivial/drawelements.c
+++ b/progs/trivial/drawelements.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
GLfloat verts[][4] = {
@@ -111,6 +111,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/drawrange.c b/progs/trivial/drawrange.c
index 9c787cbfcde..e9ea99b5376 100644
--- a/progs/trivial/drawrange.c
+++ b/progs/trivial/drawrange.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
GLfloat verts[][4] = {
@@ -109,6 +109,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/lineloop-elts.c b/progs/trivial/lineloop-elts.c
index 96da8e4ad6b..ab944157c01 100644
--- a/progs/trivial/lineloop-elts.c
+++ b/progs/trivial/lineloop-elts.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
GLfloat verts[][4] = {
@@ -111,6 +111,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/long-fixed-func.c b/progs/trivial/long-fixed-func.c
index 88f4fe01ec8..41ad25c1b3d 100644
--- a/progs/trivial/long-fixed-func.c
+++ b/progs/trivial/long-fixed-func.c
@@ -5,7 +5,7 @@
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -142,6 +142,7 @@ main(int argc, char **argv)
if (glutCreateWindow("tri-long-fixedfunc") == GL_FALSE) {
exit(1);
}
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
diff --git a/progs/trivial/point-param.c b/progs/trivial/point-param.c
index 96544a05255..1edeec3468a 100644
--- a/progs/trivial/point-param.c
+++ b/progs/trivial/point-param.c
@@ -22,7 +22,7 @@
* OF THIS SOFTWARE.
*/
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
@@ -146,6 +146,8 @@ int main(int argc, char **argv)
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
diff --git a/progs/trivial/quad-tex-3d.c b/progs/trivial/quad-tex-3d.c
index fd02d9d6adc..ca7ea91d2f3 100644
--- a/progs/trivial/quad-tex-3d.c
+++ b/progs/trivial/quad-tex-3d.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -167,6 +168,8 @@ int main(int argc, char **argv)
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
diff --git a/progs/trivial/quad-tex-pbo.c b/progs/trivial/quad-tex-pbo.c
index 5b63c698a7e..c6f60f51fa6 100644
--- a/progs/trivial/quad-tex-pbo.c
+++ b/progs/trivial/quad-tex-pbo.c
@@ -22,7 +22,7 @@
* OF THIS SOFTWARE.
*/
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <stdio.h>
#include <string.h>
@@ -171,6 +171,8 @@ int main(int argc, char **argv)
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
diff --git a/progs/trivial/readpixels.c b/progs/trivial/readpixels.c
index 783468ae2f6..88aac2684a8 100644
--- a/progs/trivial/readpixels.c
+++ b/progs/trivial/readpixels.c
@@ -3,7 +3,7 @@
*/
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
@@ -91,6 +91,8 @@ int main(int argc, char **argv)
if (argc > 1)
Zoom = atof(argv[1]);
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
diff --git a/progs/trivial/tri-array-interleaved.c b/progs/trivial/tri-array-interleaved.c
index e40e69266e8..95de2056cf1 100644
--- a/progs/trivial/tri-array-interleaved.c
+++ b/progs/trivial/tri-array-interleaved.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
struct {
@@ -110,6 +110,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/tri-blend-color.c b/progs/trivial/tri-blend-color.c
index b9a539410bc..d2d72d0b62f 100644
--- a/progs/trivial/tri-blend-color.c
+++ b/progs/trivial/tri-blend-color.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -131,6 +132,8 @@ int main(int argc, char **argv)
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
diff --git a/progs/trivial/tri-blend-max.c b/progs/trivial/tri-blend-max.c
index ebc241c1c16..b39f8f3f12a 100644
--- a/progs/trivial/tri-blend-max.c
+++ b/progs/trivial/tri-blend-max.c
@@ -41,8 +41,9 @@
* to demonstrate the effect order has on alpha blending results.
* Use the 't' key to toggle the order of drawing polygons.
*/
-#include <GL/glut.h>
#include <stdlib.h>
+#include <GL/glew.h>
+#include <GL/glut.h>
static int leftFirst = GL_TRUE;
@@ -136,6 +137,7 @@ int main(int argc, char** argv)
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize (200, 200);
glutCreateWindow (argv[0]);
+ glewInit();
init();
glutReshapeFunc (reshape);
glutKeyboardFunc (keyboard);
diff --git a/progs/trivial/tri-blend-min.c b/progs/trivial/tri-blend-min.c
index 00b2dec7056..656297c0ce0 100644
--- a/progs/trivial/tri-blend-min.c
+++ b/progs/trivial/tri-blend-min.c
@@ -41,8 +41,9 @@
* to demonstrate the effect order has on alpha blending results.
* Use the 't' key to toggle the order of drawing polygons.
*/
-#include <GL/glut.h>
#include <stdlib.h>
+#include <GL/glew.h>
+#include <GL/glut.h>
static int leftFirst = GL_TRUE;
@@ -136,6 +137,7 @@ int main(int argc, char** argv)
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize (200, 200);
glutCreateWindow (argv[0]);
+ glewInit();
init();
glutReshapeFunc (reshape);
glutKeyboardFunc (keyboard);
diff --git a/progs/trivial/tri-blend-revsub.c b/progs/trivial/tri-blend-revsub.c
index be187fd4cee..fe225f1f4e0 100644
--- a/progs/trivial/tri-blend-revsub.c
+++ b/progs/trivial/tri-blend-revsub.c
@@ -41,8 +41,9 @@
* to demonstrate the effect order has on alpha blending results.
* Use the 't' key to toggle the order of drawing polygons.
*/
-#include <GL/glut.h>
#include <stdlib.h>
+#include <GL/glew.h>
+#include <GL/glut.h>
static int leftFirst = GL_TRUE;
@@ -136,6 +137,7 @@ int main(int argc, char** argv)
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize (200, 200);
glutCreateWindow (argv[0]);
+ glewInit();
init();
glutReshapeFunc (reshape);
glutKeyboardFunc (keyboard);
diff --git a/progs/trivial/tri-blend-sub.c b/progs/trivial/tri-blend-sub.c
index d207791108c..cc1aeaf4a48 100644
--- a/progs/trivial/tri-blend-sub.c
+++ b/progs/trivial/tri-blend-sub.c
@@ -41,8 +41,9 @@
* to demonstrate the effect order has on alpha blending results.
* Use the 't' key to toggle the order of drawing polygons.
*/
-#include <GL/glut.h>
#include <stdlib.h>
+#include <GL/glew.h>
+#include <GL/glut.h>
static int leftFirst = GL_TRUE;
@@ -136,6 +137,7 @@ int main(int argc, char** argv)
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB);
glutInitWindowSize (200, 200);
glutCreateWindow (argv[0]);
+ glewInit();
init();
glutReshapeFunc (reshape);
glutKeyboardFunc (keyboard);
diff --git a/progs/trivial/tri-fbo-tex.c b/progs/trivial/tri-fbo-tex.c
index d413d4081f1..253f9310db4 100644
--- a/progs/trivial/tri-fbo-tex.c
+++ b/progs/trivial/tri-fbo-tex.c
@@ -9,7 +9,7 @@
*/
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
#include <assert.h>
#include <stdio.h>
@@ -256,6 +256,7 @@ main(int argc, char *argv[])
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Display);
diff --git a/progs/trivial/tri-fbo.c b/progs/trivial/tri-fbo.c
index 82d70c40b7e..7a38f2124cc 100644
--- a/progs/trivial/tri-fbo.c
+++ b/progs/trivial/tri-fbo.c
@@ -5,7 +5,7 @@
#include <math.h>
#include <string.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -190,6 +190,8 @@ main( int argc, char *argv[] )
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
diff --git a/progs/trivial/tri-fp-const-imm.c b/progs/trivial/tri-fp-const-imm.c
index 71113802ed1..9e2c63a22af 100644
--- a/progs/trivial/tri-fp-const-imm.c
+++ b/progs/trivial/tri-fp-const-imm.c
@@ -25,7 +25,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -159,6 +159,8 @@ int main(int argc, char **argv)
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
diff --git a/progs/trivial/tri-fp.c b/progs/trivial/tri-fp.c
index 9ff355a4caf..fcf57f5a85f 100644
--- a/progs/trivial/tri-fp.c
+++ b/progs/trivial/tri-fp.c
@@ -25,7 +25,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -157,6 +157,8 @@ int main(int argc, char **argv)
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
diff --git a/progs/trivial/tri-query.c b/progs/trivial/tri-query.c
index c9161c4f0ad..25cfcb8e148 100644
--- a/progs/trivial/tri-query.c
+++ b/progs/trivial/tri-query.c
@@ -25,7 +25,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -148,6 +148,8 @@ int main(int argc, char **argv)
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
diff --git a/progs/trivial/tri-tex-3d.c b/progs/trivial/tri-tex-3d.c
index 613803fd1b1..50f6a754189 100644
--- a/progs/trivial/tri-tex-3d.c
+++ b/progs/trivial/tri-tex-3d.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -160,6 +161,8 @@ int main(int argc, char **argv)
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
diff --git a/progs/trivial/vbo-drawarrays.c b/progs/trivial/vbo-drawarrays.c
index fb590098a32..c29954b9033 100644
--- a/progs/trivial/vbo-drawarrays.c
+++ b/progs/trivial/vbo-drawarrays.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -124,6 +124,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/vbo-drawelements.c b/progs/trivial/vbo-drawelements.c
index dddb45695cb..b1b16d920b9 100644
--- a/progs/trivial/vbo-drawelements.c
+++ b/progs/trivial/vbo-drawelements.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
struct {
@@ -128,6 +128,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/vbo-drawrange.c b/progs/trivial/vbo-drawrange.c
index 407b7541f07..fa87eaf8fe5 100644
--- a/progs/trivial/vbo-drawrange.c
+++ b/progs/trivial/vbo-drawrange.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
#define ELTOBJ 0
@@ -136,6 +136,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/vp-array-int.c b/progs/trivial/vp-array-int.c
index 4d60f2bd5f5..2e1ac1374d7 100644
--- a/progs/trivial/vp-array-int.c
+++ b/progs/trivial/vp-array-int.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
GLint verts[][4] = {
@@ -108,6 +108,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/vp-array.c b/progs/trivial/vp-array.c
index abe8f62bec3..852bf7d44d7 100644
--- a/progs/trivial/vp-array.c
+++ b/progs/trivial/vp-array.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
GLfloat verts[][4] = {
@@ -108,6 +108,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/vp-clip.c b/progs/trivial/vp-clip.c
index 206ba0b8cb8..267b927b93f 100644
--- a/progs/trivial/vp-clip.c
+++ b/progs/trivial/vp-clip.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static void Init( void )
@@ -93,6 +93,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/vp-line-clip.c b/progs/trivial/vp-line-clip.c
index b2aaf17ca4f..d27e4aae079 100644
--- a/progs/trivial/vp-line-clip.c
+++ b/progs/trivial/vp-line-clip.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static void Init( void )
@@ -107,6 +107,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/vp-tri-cb-pos.c b/progs/trivial/vp-tri-cb-pos.c
index eb3aa0a8dc6..430a4d3964c 100644
--- a/progs/trivial/vp-tri-cb-pos.c
+++ b/progs/trivial/vp-tri-cb-pos.c
@@ -5,7 +5,7 @@
#include <string.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -146,11 +146,13 @@ int main(int argc, char **argv)
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
glutMainLoop();
- return 0;
+ return 0;
}
diff --git a/progs/trivial/vp-tri-cb-tex.c b/progs/trivial/vp-tri-cb-tex.c
index 1e99d5b6abc..57fd2cdbbd1 100644
--- a/progs/trivial/vp-tri-cb-tex.c
+++ b/progs/trivial/vp-tri-cb-tex.c
@@ -5,7 +5,7 @@
#include <string.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -179,6 +179,8 @@ int main(int argc, char **argv)
exit(1);
}
+ glewInit();
+
Init();
glutReshapeFunc(Reshape);
diff --git a/progs/trivial/vp-tri-cb.c b/progs/trivial/vp-tri-cb.c
index f9d0d7f559d..1f12a2c297a 100644
--- a/progs/trivial/vp-tri-cb.c
+++ b/progs/trivial/vp-tri-cb.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static void Init( void )
@@ -98,6 +98,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/vp-tri-imm.c b/progs/trivial/vp-tri-imm.c
index c774573ba8b..f2549f3697f 100644
--- a/progs/trivial/vp-tri-imm.c
+++ b/progs/trivial/vp-tri-imm.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static void Init( void )
@@ -92,6 +92,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/vp-tri-swap.c b/progs/trivial/vp-tri-swap.c
index e9ca1a03789..a3ab1206fdf 100644
--- a/progs/trivial/vp-tri-swap.c
+++ b/progs/trivial/vp-tri-swap.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static void Init( void )
@@ -94,6 +94,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/vp-tri-tex.c b/progs/trivial/vp-tri-tex.c
index 83ec1ef2e2f..bd2b5e59f9d 100644
--- a/progs/trivial/vp-tri-tex.c
+++ b/progs/trivial/vp-tri-tex.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static void Init( void )
@@ -128,6 +128,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/vp-tri.c b/progs/trivial/vp-tri.c
index d2ef5043b22..29329773143 100644
--- a/progs/trivial/vp-tri.c
+++ b/progs/trivial/vp-tri.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static void Init( void )
@@ -95,6 +95,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_DEPTH | GLUT_RGB | GLUT_SINGLE );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/trivial/vp-unfilled.c b/progs/trivial/vp-unfilled.c
index ac23181fff7..fe2de674ea3 100644
--- a/progs/trivial/vp-unfilled.c
+++ b/progs/trivial/vp-unfilled.c
@@ -5,7 +5,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static void Init( void )
@@ -95,6 +95,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );