'demos/SConscript',
'redbook/SConscript',
'samples/SConscript',
+ 'tests/SConscript',
'trivial/SConscript',
'vp/SConscript',
'vpglsl/SConscript',
--- /dev/null
+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',
+ )
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.h"
glutInitWindowSize( 300, 300 );
glutInitWindowPosition( 0, 0 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
+ glewInit();
glutCreateWindow(argv[0] );
Init( argc, argv );
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static void
-Polygon( GLint verts, GLfloat radius, GLfloat z )
+doPolygon( GLint verts, GLfloat radius, GLfloat z )
{
int i;
for (i = 0; i < verts; i++) {
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();
}
glutInitDisplayMode( GLUT_RGB | GLUT_ALPHA | GLUT_DOUBLE |
GLUT_DEPTH | GLUT_MULTISAMPLE );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#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__
glutInitDisplayMode( GLUT_RGB );
glutCreateWindow( argv[0] );
+ glewInit();
if ( argc > 1 ) {
count = strtoul( argv[1], NULL, 0 );
#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;
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.c"
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.c"
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
*/
#include <stdlib.h>
#include <stdio.h>
+#include <GL/glew.h>
#include <GL/glut.h>
GLubyte mipmapImage32[40][46][3];
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize (500, 500);
glutCreateWindow (argv[0]);
+ glewInit();
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "../util/readtex.c"
glutInitWindowSize( 400, 400 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#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 )
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#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;
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#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;
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
#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;
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
#include <stdio.h>
#include <string.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glext.h>
glutInitWindowSize(350, 350);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
glutCreateWindow("Array texture test");
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 400;
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "GL_EXT_blend_minmax test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 400;
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "GL_NV_blend_square test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
*
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.c"
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
*/
-#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
glutInitWindowSize( 600, 300 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 400;
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "Bug #3050 Test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 400;
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "Bug #3101 Test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glext.h>
glutInitWindowSize( 350, 350 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "Bug #3195 Test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static GLenum Target = GL_TEXTURE_2D;
glutInitDisplayMode(type);
win = glutCreateWindow("Tex test");
+ glewInit();
if (!win) {
exit(1);
}
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
* 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;
glutInitWindowSize(WinWidth, WinHeight);
glutInitDisplayMode(mode);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static const GLint tests[][8] = {
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "GL_ARB_texture_env_crossbar test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#include <windows.h>
#endif
#define GL_GLEXT_LEGACY
+#include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glext.h>
glutInitWindowSize( 250, 250 );
glutInitWindowPosition( 100, 100 );
glutCreateWindow( "CVA Test" );
+ glewInit();
/* Make sure the server supports GL 1.2 vertex arrays.
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
#define NV_FRAGMENT_PROGRAM 4
+
struct breakpoint {
enum {PIXEL, LINE} type;
int x, y;
{
static GLuint skipCount = 0;
const GLubyte *ln;
- GLint pos, line, column;
+ GLint pos = 0, line, column;
GLint id;
int progType;
GLint len;
glutInitWindowSize( 200, 200 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
#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... */
#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");
*/
-#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"
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Display);
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 400, Height = 400;
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
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) {
}
glEnd();
}
- else if (Mode == HLINES) {
+ else if (Mode == MODE_HLINES) {
glBegin(GL_LINES);
for (i = 0; i < Height; i += 2) {
glVertex2f(0, i);
}
glEnd();
}
- else if (Mode == VLINES) {
+ else if (Mode == MODE_VLINES) {
glBegin(GL_LINES);
for (i = 0; i < Width; i += 2) {
glVertex2f(i, 0 );
}
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) {
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
#include <assert.h>
glutInitWindowPosition( 0, 0 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
*/
-#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;
glutInitWindowSize(Width, Height);
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
*/
-#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;
glutInitWindowSize(Width, Height);
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
*/
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
#include <assert.h>
#include <stdio.h>
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Display);
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.h"
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "extfuncs.h"
#include "readtex.h"
glutInitWindowSize(400, 400);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
* 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;
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
*/
-#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;
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#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"
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
#include <stdlib.h>
#include <string.h>
#include <time.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 400;
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "glInterleavedArrays test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include "readtex.h"
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "GL_MESA_pack_invert test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
*/
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int win_width, win_height;
glutInitWindowSize(win_width, win_height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(reshape);
glutKeyboardFunc(key);
glutDisplayFunc(display);
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
glutInitWindowSize( WinWidth, WinHeight );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
*/
-#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;
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
glewInit();
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Display);
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static GLuint BufferID;
glutInitWindowSize( 300, 300 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <GL/glew.h>
#include <GL/glut.h>
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(redraw);
*/
#include <stdlib.h>
#include <stdio.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static GLint BaseLevel = 0, MaxLevel = 8;
glutInitDisplayMode (GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowSize (600, 600);
glutCreateWindow (argv[0]);
+ glewInit();
myinit();
glutReshapeFunc (myReshape);
glutDisplayFunc(display);
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glext.h>
glutInitWindowSize(WinWidth, WinHeight);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Display);
#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. */
glutInitWindowPosition( 0, 0 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
+ glewInit();
Init( argc, argv );
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include "GL/glew.h"
#include "GL/glut.h"
static GLuint Window = 0;
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
Window = glutCreateWindow("Texture Objects");
+ glewInit();
if (!Window) {
exit(1);
}
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
glutInitWindowSize( 400, 400 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
Window[0] = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display0 );
glutInitWindowSize( 400, 400 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
Window[1] = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display1 );
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#include <GL/glext.h>
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" )
#include <stdlib.h>
#include <math.h>
#include <string.h>
+#include <GL/glew.h>
#include <GL/glut.h>
glutInitWindowSize(700, 800);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
* 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 */
glutInitWindowSize( 750, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0]);
+ glewInit();
Init();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#ifndef GL_EXT_gpu_program_parameters
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB );
glutCreateWindow( "Program Parameters Test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#if 0
#include "texture.h"
glutInitDisplayMode(GLUT_RGBA | GLUT_DEPTH | GLUT_DOUBLE);
(void) glutCreateWindow("projtex");
+ glewInit();
loadTexture = loadImageTextures;
drawObject = drawCube;
*/
-#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
static GLfloat buf[NUM_QUADS * 6 * 4];
-static GLboolean SwapBuffers = GL_TRUE;
+static GLboolean doSwapBuffers = GL_TRUE;
static GLint Frames = 0, T0 = 0;
glPopMatrix();
- if (SwapBuffers)
+ if (doSwapBuffers)
glutSwapBuffers();
/*
else
(void) y;
switch (key) {
case 's':
- SwapBuffers = !SwapBuffers;
+ doSwapBuffers = !doSwapBuffers;
break;
case 'a':
Anim = !Anim;
glutInitWindowSize(600, 600);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
* 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;
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
Win = glutCreateWindow(argv[0]);
+ glewInit();
ParseArgs(argc, argv);
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
* 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 */
glutInitWindowSize(MAX_WIDTH, MAX_HEIGHT);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
* 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"
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
*/
-#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;
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#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)
{
glutInit(&argc, argv);
glutCreateWindow("Mesa bug demo");
+ glewInit();
RUN_TEST(test_uniform_size_type);
RUN_TEST(test_attrib_size_type);
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int use20syntax = 1;
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 );
#include <stdio.h>
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int Width = 550;
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 );
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
GLboolean wrapping;
glutInitWindowSize( 400, 400 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_STENCIL );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+#include "GL/glew.h"
#include "GL/glut.h"
static GLuint Window = 0;
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
Window = glutCreateWindow("Texture Objects");
+ glewInit();
if (!Window) {
exit(1);
}
* 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;
glutInitWindowSize(WinWidth, WinHeight);
glutInitDisplayMode(mode);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include "GL/glew.h"
#include "GL/glut.h"
static GLuint Window = 0;
glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
Window = glutCreateWindow("Texture Objects");
+ glewInit();
if (!Window) {
exit(1);
}
#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. */
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
if (glutCreateWindow(argv[0]) <= 0) {
+ glewInit();
printf("Couldn't create window\n");
exit(0);
}
*/
-#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"
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
#include <stdlib.h>
#include <string.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
const GLenum filter_modes[] = {
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;
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;
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;
glutInitWindowSize( 800, 600 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow( "Texture Filter Test" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <GL/glew.h>
#include <GL/glut.h>
#undef max
glutInitWindowSize( winWidth, winHeight );
glutInitWindowPosition( 0, 0 );
glutCreateWindow( "Mixed texgen/non-texgen texture coordinate test" );
+ glewInit();
initialize();
instructions();
#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. */
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
+ glewInit();
Init(argc, argv);
*/
-#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"
glutInitWindowPosition( 0, 0 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
+ glewInit();
Init( argc, argv );
*/
-#define GL_GLEXT_PROTOTYPES
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
+#include <GL/glew.h>
#include <GL/glut.h>
glutInitWindowSize( 1000, 270 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
*/
#include <stdlib.h>
+#include <GL/glew.h>
#include <GL/glut.h>
static int win_width, win_height;
glutInitWindowSize(win_width, win_height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(reshape);
glutKeyboardFunc(key);
glutDisplayFunc(display);
typedef GLboolean (* PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
#else
+#include <GL/glew.h>
#include <GL/glut.h>
#endif
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB );
glutCreateWindow( "GL_APPLE_vertex_array_object demo" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
typedef GLboolean (* PFNGLISVERTEXARRAYAPPLEPROC) (GLuint array);
#else
+#include <GL/glew.h>
#include <GL/glut.h>
#endif
glutInitWindowSize( Width, Height );
glutInitDisplayMode( GLUT_RGB );
glutCreateWindow( "GL_APPLE_vertex_array_object demo" );
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#include <stdlib.h>
#include <string.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include "GL/glew.h"
#include "GL/glut.h"
#define MAXVERTS 10000
glutInitWindowPosition(0, 0);
glutInitWindowSize(400, 400);
if (glutCreateWindow("Isosurface") <= 0) {
+ glewInit();
exit(0);
}
glutReshapeFunc(Reshape);
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB | GLUT_DEPTH);
glutInitWindowPosition(0, 0);
glutCreateWindow(argv[0]);
+ glewInit();
myinit(argc, argv);
glutReshapeFunc(myReshape);
glutDisplayFunc(display);
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
-#define GL_GLEXT_PROTOTYPES
+#include <GL/glew.h>
#include <GL/glut.h>
glutInitWindowSize( 50, 50 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#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;
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutDisplayFunc( Display );
#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;
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
#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;
glutInitWindowSize( 250, 250 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH );
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc( Reshape );
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
#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. */
glutInitWindowPosition( 0, 0 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
+ glewInit();
Init( argc, argv );
#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. */
glutInitWindowPosition( 0, 0 );
glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
glutCreateWindow(argv[0] );
+ glewInit();
Init( argc, argv );
* 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"
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH | GLUT_STENCIL);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
* 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"
glutInitWindowSize(400, 400);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
Win = glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutSpecialFunc(SpecialKey);
#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;
glutInitWindowSize(WinWidth, WinHeight);
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
glutCreateWindow(argv[0]);
+ glewInit();
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Display);