summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--progs/SConscript1
-rw-r--r--progs/tests/SConscript133
-rw-r--r--progs/tests/afsmultiarb.c3
-rw-r--r--progs/tests/antialias.c16
-rw-r--r--progs/tests/api_speed.c5
-rw-r--r--progs/tests/arbfpspec.c3
-rw-r--r--progs/tests/arbfptest1.c3
-rw-r--r--progs/tests/arbfptexture.c3
-rw-r--r--progs/tests/arbfptrig.c3
-rw-r--r--progs/tests/arbnpot-mipmap.c2
-rw-r--r--progs/tests/arbnpot.c2
-rw-r--r--progs/tests/arbvptest1.c3
-rw-r--r--progs/tests/arbvptest3.c3
-rw-r--r--progs/tests/arbvptorus.c3
-rw-r--r--progs/tests/arbvpwarpmesh.c3
-rw-r--r--progs/tests/arraytexture.c2
-rw-r--r--progs/tests/blendminmax.c2
-rw-r--r--progs/tests/blendsquare.c2
-rw-r--r--progs/tests/blendxor.c3
-rw-r--r--progs/tests/bufferobj.c3
-rw-r--r--progs/tests/bug_3050.c2
-rw-r--r--progs/tests/bug_3101.c2
-rw-r--r--progs/tests/bug_3195.c2
-rw-r--r--progs/tests/bug_texstore_i8.c2
-rw-r--r--progs/tests/calibrate_rast.c2
-rw-r--r--progs/tests/copypixrate.c3
-rw-r--r--progs/tests/crossbar.c2
-rw-r--r--progs/tests/cva.c2
-rw-r--r--progs/tests/debugger.c6
-rw-r--r--progs/tests/dinoshade.c2
-rw-r--r--progs/tests/drawbuffers.c3
-rw-r--r--progs/tests/exactrast.c20
-rw-r--r--progs/tests/ext422square.c3
-rw-r--r--progs/tests/fbotest1.c3
-rw-r--r--progs/tests/fbotest2.c3
-rw-r--r--progs/tests/fbotexture.c3
-rw-r--r--progs/tests/fillrate.c3
-rw-r--r--progs/tests/floattex.c2
-rw-r--r--progs/tests/fog.c3
-rw-r--r--progs/tests/fogcoord.c3
-rw-r--r--progs/tests/fptest1.c3
-rw-r--r--progs/tests/fptexture.c3
-rw-r--r--progs/tests/interleave.c2
-rw-r--r--progs/tests/invert.c2
-rw-r--r--progs/tests/lineclip.c2
-rw-r--r--progs/tests/manytex.c2
-rw-r--r--progs/tests/mapbufrange.c3
-rw-r--r--progs/tests/mapvbo.c3
-rw-r--r--progs/tests/minmag.c2
-rw-r--r--progs/tests/mipmap_limits.c2
-rw-r--r--progs/tests/mipmap_view.c2
-rw-r--r--progs/tests/multipal.c2
-rw-r--r--progs/tests/multitexarray.c2
-rw-r--r--progs/tests/multiwindow.c3
-rw-r--r--progs/tests/no_s3tc.c2
-rw-r--r--progs/tests/packedpixels.c2
-rw-r--r--progs/tests/pbo.c3
-rw-r--r--progs/tests/prog_parameter.c2
-rw-r--r--progs/tests/projtex.c2
-rw-r--r--progs/tests/quads.c9
-rw-r--r--progs/tests/random.c3
-rw-r--r--progs/tests/readrate.c3
-rw-r--r--progs/tests/rubberband.c3
-rw-r--r--progs/tests/seccolor.c3
-rw-r--r--progs/tests/shader_api.c3
-rw-r--r--progs/tests/stencil_twoside.c2
-rw-r--r--progs/tests/stencil_wrap.c2
-rw-r--r--progs/tests/stencilwrap.c2
-rw-r--r--progs/tests/subtex.c2
-rw-r--r--progs/tests/subtexrate.c3
-rw-r--r--progs/tests/tex1d.c2
-rw-r--r--progs/tests/texcmp.c3
-rw-r--r--progs/tests/texcompress2.c3
-rw-r--r--progs/tests/texfilt.c14
-rw-r--r--progs/tests/texgenmix.c2
-rw-r--r--progs/tests/texline.c2
-rw-r--r--progs/tests/texrect.c3
-rw-r--r--progs/tests/texwrap.c3
-rw-r--r--progs/tests/unfilledclip.c2
-rw-r--r--progs/tests/vao-01.c2
-rw-r--r--progs/tests/vao-02.c2
-rw-r--r--progs/tests/vparray.c3
-rw-r--r--progs/tests/vpeval.c3
-rw-r--r--progs/tests/vptest1.c3
-rw-r--r--progs/tests/vptest2.c3
-rw-r--r--progs/tests/vptest3.c3
-rw-r--r--progs/tests/vptorus.c3
-rw-r--r--progs/tests/vpwarpmesh.c3
-rw-r--r--progs/tests/yuvrect.c3
-rw-r--r--progs/tests/yuvsquare.c3
-rw-r--r--progs/tests/zcomp.c3
-rw-r--r--progs/tests/zdrawpix.c3
-rw-r--r--progs/tests/zreaddraw.c3
93 files changed, 344 insertions, 78 deletions
diff --git a/progs/SConscript b/progs/SConscript
index 1670f97bc73..71db2831d6e 100644
--- a/progs/SConscript
+++ b/progs/SConscript
@@ -3,6 +3,7 @@ SConscript([
'demos/SConscript',
'redbook/SConscript',
'samples/SConscript',
+ 'tests/SConscript',
'trivial/SConscript',
'vp/SConscript',
'vpglsl/SConscript',
diff --git a/progs/tests/SConscript b/progs/tests/SConscript
new file mode 100644
index 00000000000..f01525d6fa1
--- /dev/null
+++ b/progs/tests/SConscript
@@ -0,0 +1,133 @@
+Import('*')
+
+if not env['GLUT']:
+ Return()
+
+env = env.Clone()
+
+env.Prepend(CPPPATH = [
+ '../util',
+])
+
+env.Prepend(LIBS = [
+ util,
+ '$GLUT_LIB'
+])
+
+if env['platform'] == 'windows':
+ env.Append(CPPDEFINES = ['NOMINMAX'])
+ env.Prepend(LIBS = ['winmm'])
+
+linux_progs = [
+ 'api_speed',
+]
+
+glx_progs = [
+ 'auxbuffer',
+ 'getprocaddress',
+ 'jkrahntest',
+ 'sharedtex',
+ 'texcompress2',
+ 'texobjshare',
+]
+
+mesa_progs = [
+ 'debugger',
+]
+
+progs = [
+ 'afsmultiarb',
+ 'antialias',
+ 'arbfpspec',
+ 'arbfptest1',
+ 'arbfptexture',
+ 'arbfptrig',
+ 'arbnpot-mipmap',
+ 'arbnpot',
+ 'arbvptest1',
+ 'arbvptest3',
+ 'arbvptorus',
+ 'arbvpwarpmesh',
+ 'arraytexture',
+ 'blendminmax',
+ 'blendsquare',
+ 'blendxor',
+ 'bufferobj',
+ 'bug_3050',
+ 'bug_3101',
+ 'bug_3195',
+ 'bug_texstore_i8',
+ 'calibrate_rast',
+ 'copypixrate',
+ 'crossbar',
+ 'cva',
+ 'dinoshade',
+ 'drawbuffers',
+ 'exactrast',
+ 'ext422square',
+ 'fbotest1',
+ 'fbotest2',
+ 'fbotexture',
+ 'fillrate',
+ 'floattex',
+ 'fog',
+ 'fogcoord',
+ 'fptest1',
+ 'fptexture',
+ 'interleave',
+ 'invert',
+ 'lineclip',
+ 'manytex',
+ 'mapbufrange',
+ 'mapvbo',
+ 'minmag',
+ 'mipmap_limits',
+ 'mipmap_view',
+ 'multipal',
+ 'multitexarray',
+ 'multiwindow',
+ 'no_s3tc',
+ 'packedpixels',
+ 'pbo',
+ 'prog_parameter',
+ 'projtex',
+ 'quads',
+ 'random',
+ 'readrate',
+ 'rubberband',
+ 'seccolor',
+ 'shader_api',
+ 'stencil_twoside',
+ 'stencil_wrap',
+ 'stencilwrap',
+ 'subtex',
+ 'subtexrate',
+ 'tex1d',
+ 'texcmp',
+ 'texfilt',
+ 'texgenmix',
+ 'texline',
+ 'texrect',
+ 'texwrap',
+ 'unfilledclip',
+ 'vao-01',
+ 'vao-02',
+ 'vparray',
+ 'vpeval',
+ 'vptest1',
+ 'vptest2',
+ 'vptest3',
+ 'vptorus',
+ 'vpwarpmesh',
+ 'yuvrect',
+ 'yuvsquare',
+ 'zcomp',
+ 'zdrawpix',
+ 'zreaddraw',
+]
+
+for prog in progs:
+ env.Program(
+ target = prog,
+ source = prog + '.c',
+ )
diff --git a/progs/tests/afsmultiarb.c b/progs/tests/afsmultiarb.c
index c026ecd4ce2..162ab19493c 100644
--- a/progs/tests/afsmultiarb.c
+++ b/progs/tests/afsmultiarb.c
@@ -11,7 +11,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.h"
@@ -442,6 +442,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 300, 300 );
glutInitWindowPosition( 0, 0 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
+ glewInit();
glutCreateWindow(argv[0] );
Init( argc, argv );
diff --git a/progs/tests/antialias.c b/progs/tests/antialias.c
index f23b5aff324..656bf2471fe 100644
--- a/progs/tests/antialias.c
+++ b/progs/tests/antialias.c
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -29,7 +30,7 @@ PrintString(const char *s)
static void
-Polygon( GLint verts, GLfloat radius, GLfloat z )
+doPolygon( GLint verts, GLfloat radius, GLfloat z )
{
int i;
for (i = 0; i < verts; i++) {
@@ -47,33 +48,33 @@ DrawObject( void )
glLineWidth(3.0);
glColor3f(1, 1, 1);
glBegin(GL_LINE_LOOP);
- Polygon(12, 1.2, 0);
+ doPolygon(12, 1.2, 0);
glEnd();
glLineWidth(1.0);
glColor3f(1, 1, 1);
glBegin(GL_LINE_LOOP);
- Polygon(12, 1.1, 0);
+ doPolygon(12, 1.1, 0);
glEnd();
glColor3f(1, 0, 0);
glBegin(GL_POLYGON);
- Polygon(12, 0.4, 0.3);
+ doPolygon(12, 0.4, 0.3);
glEnd();
glColor3f(0, 1, 0);
glBegin(GL_POLYGON);
- Polygon(12, 0.6, 0.2);
+ doPolygon(12, 0.6, 0.2);
glEnd();
glColor3f(0, 0, 1);
glBegin(GL_POLYGON);
- Polygon(12, 0.8, 0.1);
+ doPolygon(12, 0.8, 0.1);
glEnd();
glColor3f(1, 1, 1);
glBegin(GL_POLYGON);
- Polygon(12, 1.0, 0);
+ doPolygon(12, 1.0, 0);
glEnd();
}
@@ -225,6 +226,7 @@ main( int argc, char *argv[] )
glutInitDisplayMode( GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE |
GLUT_DEPTH | GLUT_MULTISAMPLE );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/api_speed.c b/progs/tests/api_speed.c
index aed65b35fe3..28e28e61d8b 100644
--- a/progs/tests/api_speed.c
+++ b/progs/tests/api_speed.c
@@ -37,9 +37,7 @@
#include <stdio.h>
#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
-#include <GL/gl.h>
-#include <GL/glext.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#define inline __inline__
@@ -127,6 +125,7 @@ int main( int argc, char *argv[] )
glutInitDisplayMode( GLUT_RGB );
glutCreateWindow( argv[0] );
+ glewInit();
if ( argc > 1 ) {
count = strtoul( argv[1], NULL, 0 );
diff --git a/progs/tests/arbfpspec.c b/progs/tests/arbfpspec.c
index eac2a9100f5..550e9543406 100644
--- a/progs/tests/arbfpspec.c
+++ b/progs/tests/arbfpspec.c
@@ -8,7 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static float Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
@@ -180,6 +180,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
diff --git a/progs/tests/arbfptest1.c b/progs/tests/arbfptest1.c
index 7949f87eddb..e7237b76a87 100644
--- a/progs/tests/arbfptest1.c
+++ b/progs/tests/arbfptest1.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>
@@ -201,6 +201,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/arbfptexture.c b/progs/tests/arbfptexture.c
index a854908c311..f66b060cbb2 100644
--- a/progs/tests/arbfptexture.c
+++ b/progs/tests/arbfptexture.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>
#include "readtex.c"
@@ -143,6 +143,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
diff --git a/progs/tests/arbfptrig.c b/progs/tests/arbfptrig.c
index 26b68c6b412..95f008a078d 100644
--- a/progs/tests/arbfptrig.c
+++ b/progs/tests/arbfptrig.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>
#include "readtex.c"
@@ -146,6 +146,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
diff --git a/progs/tests/arbnpot-mipmap.c b/progs/tests/arbnpot-mipmap.c
index 4ed84e7acee..700ec0b09d0 100644
--- a/progs/tests/arbnpot-mipmap.c
+++ b/progs/tests/arbnpot-mipmap.c
@@ -46,6 +46,7 @@
*/
#include <stdlib.h>
#include <stdio.h>
+#include <GL/glew.h>
#include <GL/glut.h>
GLubyte mipmapImage32[40][46][3];
@@ -175,6 +176,7 @@ int main(int argc, char** argv)
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize (500, 500);
glutCreateWindow (argv[0]);
+ glewInit();
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
diff --git a/progs/tests/arbnpot.c b/progs/tests/arbnpot.c
index 05ba85dad9e..c51a5416413 100644
--- a/progs/tests/arbnpot.c
+++ b/progs/tests/arbnpot.c
@@ -8,6 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "../util/readtex.c"
@@ -188,6 +189,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 400, 400 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/arbvptest1.c b/progs/tests/arbvptest1.c
index 0ebd3987f58..3a6d71a42bd 100644
--- a/progs/tests/arbvptest1.c
+++ b/progs/tests/arbvptest1.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 Display( void )
@@ -155,6 +155,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/arbvptest3.c b/progs/tests/arbvptest3.c
index 6437062900e..56de7b46963 100644
--- a/progs/tests/arbvptest3.c
+++ b/progs/tests/arbvptest3.c
@@ -4,7 +4,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static float Zrot = 0.0;
@@ -118,6 +118,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/arbvptorus.c b/progs/tests/arbvptorus.c
index 9d19ef90da5..f1f84d87749 100644
--- a/progs/tests/arbvptorus.c
+++ b/progs/tests/arbvptorus.c
@@ -7,7 +7,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static float Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
@@ -174,6 +174,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
diff --git a/progs/tests/arbvpwarpmesh.c b/progs/tests/arbvpwarpmesh.c
index 3dfe94f7596..973a1574099 100644
--- a/progs/tests/arbvpwarpmesh.c
+++ b/progs/tests/arbvpwarpmesh.c
@@ -7,7 +7,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static float Xrot = -60.0, Yrot = 0.0, Zrot = 0.0;
@@ -234,6 +234,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
diff --git a/progs/tests/arraytexture.c b/progs/tests/arraytexture.c
index 48c622be302..6c0484df0de 100644
--- a/progs/tests/arraytexture.c
+++ b/progs/tests/arraytexture.c
@@ -34,6 +34,7 @@
#include <stdio.h>
#include <string.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glext.h>
@@ -326,6 +327,7 @@ int main(int argc, char *argv[])
glutInitWindowSize(350, 350);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
glutCreateWindow("Array texture test");
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
diff --git a/progs/tests/blendminmax.c b/progs/tests/blendminmax.c
index 2aab1a39d29..7297f41b787 100644
--- a/progs/tests/blendminmax.c
+++ b/progs/tests/blendminmax.c
@@ -34,6 +34,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 400;
@@ -200,6 +201,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "GL_EXT_blend_minmax test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/blendsquare.c b/progs/tests/blendsquare.c
index 1694866a557..3ee3ae2230c 100644
--- a/progs/tests/blendsquare.c
+++ b/progs/tests/blendsquare.c
@@ -34,6 +34,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 400;
@@ -169,6 +170,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "GL_NV_blend_square test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/blendxor.c b/progs/tests/blendxor.c
index 8961a827eab..d6dcb8b8486 100644
--- a/progs/tests/blendxor.c
+++ b/progs/tests/blendxor.c
@@ -3,10 +3,10 @@
*
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.c"
@@ -183,6 +183,7 @@ main(int argc, char *argv[])
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
diff --git a/progs/tests/bufferobj.c b/progs/tests/bufferobj.c
index 9edb86e5752..1d97b060efc 100644
--- a/progs/tests/bufferobj.c
+++ b/progs/tests/bufferobj.c
@@ -6,11 +6,11 @@
*/
-#define GL_GLEXT_PROTOTYPES
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#define NUM_OBJECTS 10
@@ -428,6 +428,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 600, 300 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
diff --git a/progs/tests/bug_3050.c b/progs/tests/bug_3050.c
index 4ea7b80f231..a04e40eaf6e 100644
--- a/progs/tests/bug_3050.c
+++ b/progs/tests/bug_3050.c
@@ -39,6 +39,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 400;
@@ -154,6 +155,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "Bug #3050 Test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/bug_3101.c b/progs/tests/bug_3101.c
index 761dcbb9513..06a97761557 100644
--- a/progs/tests/bug_3101.c
+++ b/progs/tests/bug_3101.c
@@ -34,6 +34,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 400;
@@ -119,6 +120,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "Bug #3101 Test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/bug_3195.c b/progs/tests/bug_3195.c
index 4aceae04abe..a075b94e370 100644
--- a/progs/tests/bug_3195.c
+++ b/progs/tests/bug_3195.c
@@ -36,6 +36,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glext.h>
@@ -264,6 +265,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 350, 350 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "Bug #3195 Test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
diff --git a/progs/tests/bug_texstore_i8.c b/progs/tests/bug_texstore_i8.c
index f8dac210f7a..10e5eba7c5e 100644
--- a/progs/tests/bug_texstore_i8.c
+++ b/progs/tests/bug_texstore_i8.c
@@ -29,6 +29,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static GLenum Target = GL_TEXTURE_2D;
@@ -180,6 +181,7 @@ int main(int argc, char **argv)
glutInitDisplayMode(type);
win = glutCreateWindow("Tex test");
+ glewInit();
if (!win) {
exit(1);
}
diff --git a/progs/tests/calibrate_rast.c b/progs/tests/calibrate_rast.c
index 37d8ac85e54..5d89ff79c55 100644
--- a/progs/tests/calibrate_rast.c
+++ b/progs/tests/calibrate_rast.c
@@ -19,6 +19,7 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -386,6 +387,7 @@ main(int argc, char *argv[])
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
diff --git a/progs/tests/copypixrate.c b/progs/tests/copypixrate.c
index 142315364c6..aa4acfc18b5 100644
--- a/progs/tests/copypixrate.c
+++ b/progs/tests/copypixrate.c
@@ -5,11 +5,11 @@
* 26 Jan 2006
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static GLint WinWidth = 1000, WinHeight = 800;
@@ -260,6 +260,7 @@ main(int argc, char *argv[])
glutInitWindowSize(WinWidth, WinHeight);
glutInitDisplayMode(mode);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
diff --git a/progs/tests/crossbar.c b/progs/tests/crossbar.c
index 12aabb1c9ad..3dd21372f9a 100644
--- a/progs/tests/crossbar.c
+++ b/progs/tests/crossbar.c
@@ -35,6 +35,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static const GLint tests[][8] = {
@@ -226,6 +227,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "GL_ARB_texture_env_crossbar test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/cva.c b/progs/tests/cva.c
index a9393aef0ca..80483900cb7 100644
--- a/progs/tests/cva.c
+++ b/progs/tests/cva.c
@@ -15,6 +15,7 @@
#include <windows.h>
#endif
#define GL_GLEXT_LEGACY
+#include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glext.h>
@@ -129,6 +130,7 @@ int main( int argc, char **argv )
glutInitWindowSize( 250, 250 );
glutInitWindowPosition( 100, 100 );
glutCreateWindow( "CVA Test" );
+ glewInit();
/* Make sure the server supports GL 1.2 vertex arrays.
*/
diff --git a/progs/tests/debugger.c b/progs/tests/debugger.c
index 4c6955bcfc6..1c2f9bebca6 100644
--- a/progs/tests/debugger.c
+++ b/progs/tests/debugger.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -81,6 +81,7 @@ find_line_column(const GLubyte *string, const GLubyte *pos,
#define NV_FRAGMENT_PROGRAM 4
+
struct breakpoint {
enum {PIXEL, LINE} type;
int x, y;
@@ -101,7 +102,7 @@ static void Debugger2(GLenum target, GLvoid *data)
{
static GLuint skipCount = 0;
const GLubyte *ln;
- GLint pos, line, column;
+ GLint pos = 0, line, column;
GLint id;
int progType;
GLint len;
@@ -721,6 +722,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 200, 200 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
diff --git a/progs/tests/dinoshade.c b/progs/tests/dinoshade.c
index 44115b9209d..fb7c3f4535c 100644
--- a/progs/tests/dinoshade.c
+++ b/progs/tests/dinoshade.c
@@ -43,6 +43,7 @@
#include <windows.h>
#endif
#define GL_GLEXT_LEGACY
+#include <GL/glew.h> /* OpenGL Utility Toolkit header */
#include <GL/glut.h> /* OpenGL Utility Toolkit header */
/* Some <math.h> files do not define M_PI... */
@@ -823,6 +824,7 @@ main(int argc, char **argv)
#endif
glutCreateWindow("Shadowy Leapin' Lizards");
+ glewInit();
if (glutGet(GLUT_WINDOW_STENCIL_SIZE) <= 1) {
printf("dinoshade: Sorry, I need at least 2 bits of stencil.\n");
diff --git a/progs/tests/drawbuffers.c b/progs/tests/drawbuffers.c
index 5e89569380a..d75a870c26b 100644
--- a/progs/tests/drawbuffers.c
+++ b/progs/tests/drawbuffers.c
@@ -7,11 +7,11 @@
*/
-#define GL_GLEXT_PROTOTYPES
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "extfuncs.h"
@@ -294,6 +294,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/tests/exactrast.c b/progs/tests/exactrast.c
index 56c0c79c3fa..63b8336d973 100644
--- a/progs/tests/exactrast.c
+++ b/progs/tests/exactrast.c
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 400, Height = 400;
@@ -34,14 +35,14 @@ static float Xtrans = 0, Ytrans = 0;
static float Step = 0.125;
enum {
- POINTS,
- HLINES,
- VLINES,
- QUADS,
+ MODE_POINTS,
+ MODE_HLINES,
+ MODE_VLINES,
+ MODE_QUADS,
NUM_MODES
};
-static int Mode = POINTS;
+static int Mode = MODE_POINTS;
static void
@@ -58,7 +59,7 @@ Draw(void)
glPushMatrix();
glTranslatef(tx + Xtrans, ty + Ytrans, 0);
- if (Mode == POINTS) {
+ if (Mode == MODE_POINTS) {
glBegin(GL_POINTS);
for (j = 0; j < Height; j += 2) {
for (i = 0; i < Width; i += 2) {
@@ -67,7 +68,7 @@ Draw(void)
}
glEnd();
}
- else if (Mode == HLINES) {
+ else if (Mode == MODE_HLINES) {
glBegin(GL_LINES);
for (i = 0; i < Height; i += 2) {
glVertex2f(0, i);
@@ -75,7 +76,7 @@ Draw(void)
}
glEnd();
}
- else if (Mode == VLINES) {
+ else if (Mode == MODE_VLINES) {
glBegin(GL_LINES);
for (i = 0; i < Width; i += 2) {
glVertex2f(i, 0 );
@@ -83,7 +84,7 @@ Draw(void)
}
glEnd();
}
- else if (Mode == QUADS) {
+ else if (Mode == MODE_QUADS) {
glBegin(GL_QUADS);
for (j = 0; j < Height; j += 4) {
for (i = 0; i < Width; i += 4) {
@@ -189,6 +190,7 @@ main(int argc, char *argv[])
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
diff --git a/progs/tests/ext422square.c b/progs/tests/ext422square.c
index 6533514d697..89e99f02926 100644
--- a/progs/tests/ext422square.c
+++ b/progs/tests/ext422square.c
@@ -12,7 +12,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
#include <assert.h>
@@ -249,6 +249,7 @@ int main( int argc, char *argv[] )
glutInitWindowPosition( 0, 0 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
diff --git a/progs/tests/fbotest1.c b/progs/tests/fbotest1.c
index ab2757c3c3d..8dac21494e6 100644
--- a/progs/tests/fbotest1.c
+++ b/progs/tests/fbotest1.c
@@ -6,11 +6,11 @@
*/
-#define GL_GLEXT_PROTOTYPES
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Win;
@@ -202,6 +202,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/tests/fbotest2.c b/progs/tests/fbotest2.c
index 5283c7e1fd6..f9c506193f6 100644
--- a/progs/tests/fbotest2.c
+++ b/progs/tests/fbotest2.c
@@ -6,11 +6,11 @@
*/
-#define GL_GLEXT_PROTOTYPES
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Win = 0;
@@ -191,6 +191,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/tests/fbotexture.c b/progs/tests/fbotexture.c
index ae993576b02..bc6c7278edf 100644
--- a/progs/tests/fbotexture.c
+++ b/progs/tests/fbotexture.c
@@ -9,7 +9,7 @@
*/
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
#include <assert.h>
#include <stdio.h>
@@ -605,6 +605,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/tests/fillrate.c b/progs/tests/fillrate.c
index 8fe636c364b..1e58df281e1 100644
--- a/progs/tests/fillrate.c
+++ b/progs/tests/fillrate.c
@@ -6,10 +6,10 @@
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.h"
@@ -194,6 +194,7 @@ main(int argc, char *argv[])
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
diff --git a/progs/tests/floattex.c b/progs/tests/floattex.c
index dd6d882089c..dd99d836c64 100644
--- a/progs/tests/floattex.c
+++ b/progs/tests/floattex.c
@@ -8,6 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "extfuncs.h"
#include "readtex.h"
@@ -230,6 +231,7 @@ main(int argc, char *argv[])
glutInitWindowSize(400, 400);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
diff --git a/progs/tests/fog.c b/progs/tests/fog.c
index ecd9f533f99..b6cea8c080a 100644
--- a/progs/tests/fog.c
+++ b/progs/tests/fog.c
@@ -30,10 +30,10 @@
* Test to exercise fog modes and for comparison with GL_EXT_fog_coord.
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 600;
@@ -190,6 +190,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/fogcoord.c b/progs/tests/fogcoord.c
index 89355742aad..7822d33b09f 100644
--- a/progs/tests/fogcoord.c
+++ b/progs/tests/fogcoord.c
@@ -3,10 +3,10 @@
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 600;
@@ -93,6 +93,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/fptest1.c b/progs/tests/fptest1.c
index 095190a8aef..2b8f8d0f5ec 100644
--- a/progs/tests/fptest1.c
+++ b/progs/tests/fptest1.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>
@@ -216,6 +216,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/fptexture.c b/progs/tests/fptexture.c
index f57ad628282..332e07182dc 100644
--- a/progs/tests/fptexture.c
+++ b/progs/tests/fptexture.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>
#include "../util/readtex.c"
@@ -141,6 +141,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
diff --git a/progs/tests/interleave.c b/progs/tests/interleave.c
index e98b3ed0469..47bf9dfbe5e 100644
--- a/progs/tests/interleave.c
+++ b/progs/tests/interleave.c
@@ -36,6 +36,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 400;
@@ -386,6 +387,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "glInterleavedArrays test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/invert.c b/progs/tests/invert.c
index 750592ed79f..63099fbd221 100644
--- a/progs/tests/invert.c
+++ b/progs/tests/invert.c
@@ -35,6 +35,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.h"
@@ -186,6 +187,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "GL_MESA_pack_invert test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/lineclip.c b/progs/tests/lineclip.c
index 098f5e92ebd..bb688c04a5f 100644
--- a/progs/tests/lineclip.c
+++ b/progs/tests/lineclip.c
@@ -26,6 +26,7 @@
*/
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int win_width, win_height;
@@ -164,6 +165,7 @@ main(int argc, char *argv[])
glutInitWindowSize(win_width, win_height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(reshape);
glutKeyboardFunc(key);
glutDisplayFunc(display);
diff --git a/progs/tests/manytex.c b/progs/tests/manytex.c
index 83c86766571..52e7e1de44a 100644
--- a/progs/tests/manytex.c
+++ b/progs/tests/manytex.c
@@ -13,6 +13,7 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -336,6 +337,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( WinWidth, WinHeight );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/mapbufrange.c b/progs/tests/mapbufrange.c
index 04d57b58f1b..0021bb26071 100644
--- a/progs/tests/mapbufrange.c
+++ b/progs/tests/mapbufrange.c
@@ -9,13 +9,13 @@
*/
-#define GL_GLEXT_PROTOTYPES
#include <assert.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <GL/glew.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static GLuint Win;
@@ -194,6 +194,7 @@ main(int argc, char *argv[])
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
glewInit();
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Display);
diff --git a/progs/tests/mapvbo.c b/progs/tests/mapvbo.c
index 49e120de73c..c392e768358 100644
--- a/progs/tests/mapvbo.c
+++ b/progs/tests/mapvbo.c
@@ -10,9 +10,9 @@
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static GLuint BufferID;
@@ -129,6 +129,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 300, 300 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/minmag.c b/progs/tests/minmag.c
index 78ef9db03ac..03019f94faa 100644
--- a/progs/tests/minmag.c
+++ b/progs/tests/minmag.c
@@ -17,6 +17,7 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -189,6 +190,7 @@ main(int argc, char *argv[])
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(redraw);
diff --git a/progs/tests/mipmap_limits.c b/progs/tests/mipmap_limits.c
index 8bdad826f7c..7f0390b07dd 100644
--- a/progs/tests/mipmap_limits.c
+++ b/progs/tests/mipmap_limits.c
@@ -51,6 +51,7 @@
*/
#include <stdlib.h>
#include <stdio.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static GLint BaseLevel = 0, MaxLevel = 8;
@@ -260,6 +261,7 @@ int main(int argc, char** argv)
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize (600, 600);
glutCreateWindow (argv[0]);
+ glewInit();
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
diff --git a/progs/tests/mipmap_view.c b/progs/tests/mipmap_view.c
index 54607b89398..16f3584f703 100644
--- a/progs/tests/mipmap_view.c
+++ b/progs/tests/mipmap_view.c
@@ -10,6 +10,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glext.h>
@@ -242,6 +243,7 @@ main(int argc, char *argv[])
glutInitWindowSize(WinWidth, WinHeight);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Display);
diff --git a/progs/tests/multipal.c b/progs/tests/multipal.c
index 7bd44735659..4a940169780 100644
--- a/progs/tests/multipal.c
+++ b/progs/tests/multipal.c
@@ -13,6 +13,7 @@
#include <windows.h>
#endif
#define GL_GLEXT_LEGACY
+#include <GL/glew.h>
#include <GL/glut.h>
#include "../util/readtex.c" /* I know, this is a hack. */
@@ -350,6 +351,7 @@ int main( int argc, char *argv[] )
glutInitWindowPosition( 0, 0 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
+ glewInit();
Init( argc, argv );
diff --git a/progs/tests/multitexarray.c b/progs/tests/multitexarray.c
index b4fab004a63..518fee2992c 100644
--- a/progs/tests/multitexarray.c
+++ b/progs/tests/multitexarray.c
@@ -16,6 +16,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include "GL/glew.h"
#include "GL/glut.h"
static GLuint Window = 0;
@@ -221,6 +222,7 @@ int main( int argc, char *argv[] )
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
Window = glutCreateWindow("Texture Objects");
+ glewInit();
if (!Window) {
exit(1);
}
diff --git a/progs/tests/multiwindow.c b/progs/tests/multiwindow.c
index b069bea91cc..6db552d195a 100644
--- a/progs/tests/multiwindow.c
+++ b/progs/tests/multiwindow.c
@@ -25,6 +25,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -145,6 +146,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 400, 400 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
Window[0] = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display0 );
@@ -155,6 +157,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 400, 400 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
Window[1] = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display1 );
diff --git a/progs/tests/no_s3tc.c b/progs/tests/no_s3tc.c
index d3383ff98af..31cfb40b9d3 100644
--- a/progs/tests/no_s3tc.c
+++ b/progs/tests/no_s3tc.c
@@ -38,6 +38,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glext.h>
@@ -59,6 +60,7 @@ main( int argc, char ** argv )
glutInitWindowPosition( 0, 0 );
glutInitWindowSize( 300, 300 );
glutCreateWindow( "No S3TC Test" );
+ glewInit();
gl_version = strtod( (const char *) glGetString( GL_VERSION ), NULL );
if ( ! glutExtensionSupported( "GL_ARB_texture_compression" )
diff --git a/progs/tests/packedpixels.c b/progs/tests/packedpixels.c
index 67ffe088259..1703b271cb0 100644
--- a/progs/tests/packedpixels.c
+++ b/progs/tests/packedpixels.c
@@ -8,6 +8,7 @@
#include <stdlib.h>
#include <math.h>
#include <string.h>
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -333,6 +334,7 @@ main(int argc, char *argv[])
glutInitWindowSize(700, 800);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
diff --git a/progs/tests/pbo.c b/progs/tests/pbo.c
index b31b36cc121..9974486db39 100644
--- a/progs/tests/pbo.c
+++ b/progs/tests/pbo.c
@@ -5,12 +5,12 @@
* 11 March 2004
*/
-#define GL_GLEXT_PROTOTYPES
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "../util/readtex.c" /* a hack, I know */
@@ -287,6 +287,7 @@ main( int argc, char *argv[] )
glutInitWindowSize( 750, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0]);
+ glewInit();
Init();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
diff --git a/progs/tests/prog_parameter.c b/progs/tests/prog_parameter.c
index 96697e5bda6..6dd956c4023 100644
--- a/progs/tests/prog_parameter.c
+++ b/progs/tests/prog_parameter.c
@@ -35,6 +35,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#ifndef GL_EXT_gpu_program_parameters
@@ -274,6 +275,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB );
glutCreateWindow( "Program Parameters Test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/projtex.c b/progs/tests/projtex.c
index e3ef948ab6a..800d81ecd67 100644
--- a/progs/tests/projtex.c
+++ b/progs/tests/projtex.c
@@ -18,6 +18,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#if 0
#include "texture.h"
@@ -1005,6 +1006,7 @@ main(int argc, char **argv)
glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE);
(void) glutCreateWindow("projtex");
+ glewInit();
loadTexture = loadImageTextures;
drawObject = drawCube;
diff --git a/progs/tests/quads.c b/progs/tests/quads.c
index 1bf57e6337d..2098b51ccd2 100644
--- a/progs/tests/quads.c
+++ b/progs/tests/quads.c
@@ -3,10 +3,10 @@
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#define NUM_QUADS 20
@@ -19,7 +19,7 @@ static GLuint Vbuffer = 0;
static GLfloat buf[NUM_QUADS * 6 * 4];
-static GLboolean SwapBuffers = GL_TRUE;
+static GLboolean doSwapBuffers = GL_TRUE;
static GLint Frames = 0, T0 = 0;
@@ -48,7 +48,7 @@ Draw(void)
glPopMatrix();
- if (SwapBuffers)
+ if (doSwapBuffers)
glutSwapBuffers();
/*
else
@@ -91,7 +91,7 @@ Key(unsigned char key, int x, int y)
(void) y;
switch (key) {
case 's':
- SwapBuffers = !SwapBuffers;
+ doSwapBuffers = !doSwapBuffers;
break;
case 'a':
Anim = !Anim;
@@ -246,6 +246,7 @@ main(int argc, char *argv[])
glutInitWindowSize(600, 600);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
diff --git a/progs/tests/random.c b/progs/tests/random.c
index d52c338e0e1..4023674c05f 100644
--- a/progs/tests/random.c
+++ b/progs/tests/random.c
@@ -5,13 +5,13 @@
* 21 June 2007
*/
-#define GL_GLEXT_PROTOTYPES
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Win;
@@ -445,6 +445,7 @@ main(int argc, char *argv[])
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
Win = glutCreateWindow(argv[0]);
+ glewInit();
ParseArgs(argc, argv);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
diff --git a/progs/tests/readrate.c b/progs/tests/readrate.c
index 42ae62d48a9..6bdda049071 100644
--- a/progs/tests/readrate.c
+++ b/progs/tests/readrate.c
@@ -7,11 +7,11 @@
* gcc readrate.c -L/usr/X11R6/lib -lglut -lGLU -lGL -lX11 -o readrate
*/
-#define GL_GLEXT_PROTOTYPES
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
/* Hack, to test drawing instead of reading */
@@ -275,6 +275,7 @@ main(int argc, char *argv[])
glutInitWindowSize(MAX_WIDTH, MAX_HEIGHT);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
diff --git a/progs/tests/rubberband.c b/progs/tests/rubberband.c
index a8e64bc0916..866a0f519e5 100644
--- a/progs/tests/rubberband.c
+++ b/progs/tests/rubberband.c
@@ -2,10 +2,10 @@
* Test rubber-band selection box w/ logicops and blend.
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.c"
@@ -232,6 +232,7 @@ main(int argc, char *argv[])
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
diff --git a/progs/tests/seccolor.c b/progs/tests/seccolor.c
index 77fd40647ba..f1ba314ef07 100644
--- a/progs/tests/seccolor.c
+++ b/progs/tests/seccolor.c
@@ -3,10 +3,10 @@
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 600;
@@ -136,6 +136,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/shader_api.c b/progs/tests/shader_api.c
index 679f9137c82..a513ca6ba1f 100644
--- a/progs/tests/shader_api.c
+++ b/progs/tests/shader_api.c
@@ -5,7 +5,7 @@
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static void assert_test(const char *file, int line, int cond, const char *msg)
@@ -323,6 +323,7 @@ int main(int argc, char **argv)
{
glutInit(&argc, argv);
glutCreateWindow("Mesa bug demo");
+ glewInit();
RUN_TEST(test_uniform_size_type);
RUN_TEST(test_attrib_size_type);
diff --git a/progs/tests/stencil_twoside.c b/progs/tests/stencil_twoside.c
index 8826c46fc26..1e18ca6b5ea 100644
--- a/progs/tests/stencil_twoside.c
+++ b/progs/tests/stencil_twoside.c
@@ -33,6 +33,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int use20syntax = 1;
@@ -288,6 +289,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL );
glutCreateWindow( "GL_ATI_separate_stencil test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/stencil_wrap.c b/progs/tests/stencil_wrap.c
index 88cf3809caf..28307fef4f0 100644
--- a/progs/tests/stencil_wrap.c
+++ b/progs/tests/stencil_wrap.c
@@ -34,6 +34,7 @@
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 550;
@@ -248,6 +249,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL );
glutCreateWindow( "GL_EXT_stencil_wrap test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/stencilwrap.c b/progs/tests/stencilwrap.c
index 753375d0f3a..2e219fd8b50 100644
--- a/progs/tests/stencilwrap.c
+++ b/progs/tests/stencilwrap.c
@@ -8,6 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
GLboolean wrapping;
@@ -272,6 +273,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 400, 400 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_STENCIL );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/subtex.c b/progs/tests/subtex.c
index 81ceb085aaf..86b737c01fa 100644
--- a/progs/tests/subtex.c
+++ b/progs/tests/subtex.c
@@ -9,6 +9,7 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+#include "GL/glew.h"
#include "GL/glut.h"
static GLuint Window = 0;
@@ -207,6 +208,7 @@ int main( int argc, char *argv[] )
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
Window = glutCreateWindow("Texture Objects");
+ glewInit();
if (!Window) {
exit(1);
}
diff --git a/progs/tests/subtexrate.c b/progs/tests/subtexrate.c
index 568b68d552d..4bda970d067 100644
--- a/progs/tests/subtexrate.c
+++ b/progs/tests/subtexrate.c
@@ -5,11 +5,11 @@
* 26 Jan 2006
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static GLint WinWidth = 1024, WinHeight = 512;
@@ -337,6 +337,7 @@ main(int argc, char *argv[])
glutInitWindowSize(WinWidth, WinHeight);
glutInitDisplayMode(mode);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
diff --git a/progs/tests/tex1d.c b/progs/tests/tex1d.c
index 1fab849dd3e..4abe1068c7b 100644
--- a/progs/tests/tex1d.c
+++ b/progs/tests/tex1d.c
@@ -7,6 +7,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "GL/glew.h"
#include "GL/glut.h"
static GLuint Window = 0;
@@ -124,6 +125,7 @@ int main( int argc, char *argv[] )
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
Window = glutCreateWindow("Texture Objects");
+ glewInit();
if (!Window) {
exit(1);
}
diff --git a/progs/tests/texcmp.c b/progs/tests/texcmp.c
index 6e822fb6895..52c504a3188 100644
--- a/progs/tests/texcmp.c
+++ b/progs/tests/texcmp.c
@@ -7,7 +7,7 @@
#include <stdlib.h>
#include <math.h>
#include <string.h>
-#define GL_GLEXT_PROTOTYPES 1
+#include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.c" /* I know, this is a hack. */
@@ -371,6 +371,7 @@ int main( int argc, char *argv[] )
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
if (glutCreateWindow(argv[0]) <= 0) {
+ glewInit();
printf("Couldn't create window\n");
exit(0);
}
diff --git a/progs/tests/texcompress2.c b/progs/tests/texcompress2.c
index e2eed756b62..3e8e9908cbe 100644
--- a/progs/tests/texcompress2.c
+++ b/progs/tests/texcompress2.c
@@ -3,9 +3,9 @@
*/
-#define GL_GLEXT_PROTOTYPES
#include <assert.h>
#include <stdio.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glx.h>
#include "readtex.c"
@@ -258,6 +258,7 @@ main( int argc, char *argv[] )
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
diff --git a/progs/tests/texfilt.c b/progs/tests/texfilt.c
index 6ee4bc4eae3..fa919dba624 100644
--- a/progs/tests/texfilt.c
+++ b/progs/tests/texfilt.c
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
const GLenum filter_modes[] = {
@@ -219,8 +220,8 @@ static void Init( void )
static void generate_tunnel( unsigned num_segs, GLfloat ** pos_data,
GLfloat ** tex_data )
{
- const GLfloat far = 20.0f;
- const GLfloat near = -90.0f;
+ const GLfloat far_distance = 20.0f;
+ const GLfloat near_distance = -90.0f;
const GLfloat far_tex = 30.0f;
const GLfloat near_tex = 0.0f;
const GLfloat angle_step = (2 * M_PI) / num_segs;
@@ -241,12 +242,12 @@ static void generate_tunnel( unsigned num_segs, GLfloat ** pos_data,
for ( i = 0 ; i < num_segs ; i++ ) {
position[0] = 2.5 * sinf( angle );
position[1] = 2.5 * cosf( angle );
- position[2] = (i & 1) ? far : near;
+ position[2] = (i & 1) ? far_distance : near_distance;
position[3] = 1.0f;
position[4] = position[0];
position[5] = position[1];
- position[6] = (i & 1) ? near : far;
+ position[6] = (i & 1) ? near_distance : far_distance;
position[7] = 1.0f;
position += 8;
@@ -264,12 +265,12 @@ static void generate_tunnel( unsigned num_segs, GLfloat ** pos_data,
position[0] = 2.5 * sinf( angle );
position[1] = 2.5 * cosf( angle );
- position[2] = (i & 1) ? near : far;
+ position[2] = (i & 1) ? near_distance : far_distance;
position[3] = 1.0f;
position[4] = position[0];
position[5] = position[1];
- position[6] = (i & 1) ? far : near;
+ position[6] = (i & 1) ? far_distance : near_distance;
position[7] = 1.0f;
position += 8;
@@ -381,6 +382,7 @@ int main( int argc, char ** argv )
glutInitWindowSize( 800, 600 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "Texture Filter Test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
diff --git a/progs/tests/texgenmix.c b/progs/tests/texgenmix.c
index be8f6775c70..008da8625e2 100644
--- a/progs/tests/texgenmix.c
+++ b/progs/tests/texgenmix.c
@@ -6,6 +6,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#undef max
@@ -618,6 +619,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( winWidth, winHeight );
glutInitWindowPosition( 0, 0 );
glutCreateWindow( "Mixed texgen/non-texgen texture coordinate test" );
+ glewInit();
initialize();
instructions();
diff --git a/progs/tests/texline.c b/progs/tests/texline.c
index 76dfccd9b1a..1803832b47e 100644
--- a/progs/tests/texline.c
+++ b/progs/tests/texline.c
@@ -9,6 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "../util/readtex.c" /* I know, this is a hack. */
@@ -263,6 +264,7 @@ int main( int argc, char *argv[] )
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
+ glewInit();
Init(argc, argv);
diff --git a/progs/tests/texrect.c b/progs/tests/texrect.c
index 43edc491801..10061ee5869 100644
--- a/progs/tests/texrect.c
+++ b/progs/tests/texrect.c
@@ -6,11 +6,11 @@
*/
-#define GL_GLEXT_PROTOTYPES
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.h"
@@ -328,6 +328,7 @@ int main( int argc, char *argv[] )
glutInitWindowPosition( 0, 0 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
+ glewInit();
Init( argc, argv );
diff --git a/progs/tests/texwrap.c b/progs/tests/texwrap.c
index 8143256f8ae..12f045b72e0 100644
--- a/progs/tests/texwrap.c
+++ b/progs/tests/texwrap.c
@@ -8,10 +8,10 @@
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -294,6 +294,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 1000, 270 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/unfilledclip.c b/progs/tests/unfilledclip.c
index f25e52616aa..db6fffa3e89 100644
--- a/progs/tests/unfilledclip.c
+++ b/progs/tests/unfilledclip.c
@@ -26,6 +26,7 @@
*/
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int win_width, win_height;
@@ -194,6 +195,7 @@ main(int argc, char *argv[])
glutInitWindowSize(win_width, win_height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(reshape);
glutKeyboardFunc(key);
glutDisplayFunc(display);
diff --git a/progs/tests/vao-01.c b/progs/tests/vao-01.c
index c2d70885f05..117fae8bd9e 100644
--- a/progs/tests/vao-01.c
+++ b/progs/tests/vao-01.c
@@ -49,6 +49,7 @@ typedef void (* PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
typedef GLboolean (* PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
#else
+#include <GL/glew.h>
#include <GL/glut.h>
#endif
@@ -166,6 +167,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB );
glutCreateWindow( "GL_APPLE_vertex_array_object demo" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/vao-02.c b/progs/tests/vao-02.c
index 993bc368d40..7764ed51061 100644
--- a/progs/tests/vao-02.c
+++ b/progs/tests/vao-02.c
@@ -49,6 +49,7 @@ typedef void (* PFNGLGENVERTEXARRAYSAPPLEPROC) (GLsizei n, GLuint *arrays);
typedef GLboolean (* PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
#else
+#include <GL/glew.h>
#include <GL/glut.h>
#endif
@@ -194,6 +195,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB );
glutCreateWindow( "GL_APPLE_vertex_array_object demo" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/vparray.c b/progs/tests/vparray.c
index 580a670f8e1..9c2fad97d9d 100644
--- a/progs/tests/vparray.c
+++ b/progs/tests/vparray.c
@@ -12,7 +12,7 @@
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include "GL/glew.h"
#include "GL/glut.h"
#define MAXVERTS 10000
@@ -280,6 +280,7 @@ int main(int argc, char **argv)
glutInitWindowPosition(0, 0);
glutInitWindowSize(400, 400);
if (glutCreateWindow("Isosurface") <= 0) {
+ glewInit();
exit(0);
}
glutReshapeFunc(Reshape);
diff --git a/progs/tests/vpeval.c b/progs/tests/vpeval.c
index 8b6996d3b5c..f07737f9736 100644
--- a/progs/tests/vpeval.c
+++ b/progs/tests/vpeval.c
@@ -10,7 +10,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
@@ -222,6 +222,7 @@ main(int argc, char **argv)
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowPosition(0, 0);
glutCreateWindow(argv[0]);
+ glewInit();
myinit(argc, argv);
glutReshapeFunc(myReshape);
glutDisplayFunc(display);
diff --git a/progs/tests/vptest1.c b/progs/tests/vptest1.c
index 560df2c3fdc..51629192923 100644
--- a/progs/tests/vptest1.c
+++ b/progs/tests/vptest1.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>
@@ -161,6 +161,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/vptest2.c b/progs/tests/vptest2.c
index 2158e07f042..4161b03a673 100644
--- a/progs/tests/vptest2.c
+++ b/progs/tests/vptest2.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>
@@ -140,6 +140,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 50, 50 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/vptest3.c b/progs/tests/vptest3.c
index 2c5c8000408..4e4bfee31dc 100644
--- a/progs/tests/vptest3.c
+++ b/progs/tests/vptest3.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 float Zrot = 0.0;
@@ -111,6 +111,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
diff --git a/progs/tests/vptorus.c b/progs/tests/vptorus.c
index 764dea4ec22..e61ffdac217 100644
--- a/progs/tests/vptorus.c
+++ b/progs/tests/vptorus.c
@@ -7,7 +7,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static float Xrot = 0.0, Yrot = 0.0, Zrot = 0.0;
@@ -162,6 +162,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
diff --git a/progs/tests/vpwarpmesh.c b/progs/tests/vpwarpmesh.c
index 56aa8200ec8..80204ea1361 100644
--- a/progs/tests/vpwarpmesh.c
+++ b/progs/tests/vpwarpmesh.c
@@ -7,7 +7,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static float Xrot = -60.0, Yrot = 0.0, Zrot = 0.0;
@@ -224,6 +224,7 @@ int main( int argc, char *argv[] )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
diff --git a/progs/tests/yuvrect.c b/progs/tests/yuvrect.c
index acef4060970..aab2f80ed9a 100644
--- a/progs/tests/yuvrect.c
+++ b/progs/tests/yuvrect.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
#include "../util/readtex.c" /* I know, this is a hack. */
@@ -180,6 +180,7 @@ int main( int argc, char *argv[] )
glutInitWindowPosition( 0, 0 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
+ glewInit();
Init( argc, argv );
diff --git a/progs/tests/yuvsquare.c b/progs/tests/yuvsquare.c
index 3601e7a31c7..658528b7996 100644
--- a/progs/tests/yuvsquare.c
+++ b/progs/tests/yuvsquare.c
@@ -9,7 +9,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
#include "../util/readtex.c" /* I know, this is a hack. */
@@ -219,6 +219,7 @@ int main( int argc, char *argv[] )
glutInitWindowPosition( 0, 0 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
+ glewInit();
Init( argc, argv );
diff --git a/progs/tests/zcomp.c b/progs/tests/zcomp.c
index b53079d07fc..15e35f17b09 100644
--- a/progs/tests/zcomp.c
+++ b/progs/tests/zcomp.c
@@ -2,10 +2,10 @@
* Test Z compositing with glDrawPixels(GL_DEPTH_COMPONENT) and stencil test.
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "../util/showbuffer.c"
@@ -211,6 +211,7 @@ main(int argc, char *argv[])
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
diff --git a/progs/tests/zdrawpix.c b/progs/tests/zdrawpix.c
index dd222e7dd0b..ba7da571ebf 100644
--- a/progs/tests/zdrawpix.c
+++ b/progs/tests/zdrawpix.c
@@ -10,10 +10,10 @@
* Press 'd' to view the Z buffer as a grayscale image.
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "../util/showbuffer.c"
@@ -180,6 +180,7 @@ main(int argc, char *argv[])
glutInitWindowSize(400, 400);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
diff --git a/progs/tests/zreaddraw.c b/progs/tests/zreaddraw.c
index e2dacbf7f2f..3d8c557b370 100644
--- a/progs/tests/zreaddraw.c
+++ b/progs/tests/zreaddraw.c
@@ -8,7 +8,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
static GLint WinWidth = 500, WinHeight = 500;
@@ -107,6 +107,7 @@ int main(int argc, char *argv[])
glutInitWindowSize(WinWidth, WinHeight);
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Display);