diff options
-rw-r--r-- | src/redbook/aapoly.c | 6 | ||||
-rw-r--r-- | src/redbook/mvarray.c | 11 | ||||
-rw-r--r-- | src/redbook/polyoff.c | 10 | ||||
-rw-r--r-- | src/redbook/texbind.c | 10 | ||||
-rw-r--r-- | src/redbook/texgen.c | 11 | ||||
-rw-r--r-- | src/redbook/texprox.c | 11 | ||||
-rw-r--r-- | src/redbook/texsub.c | 10 | ||||
-rw-r--r-- | src/redbook/texture3d.c | 11 | ||||
-rw-r--r-- | src/redbook/varray.c | 10 | ||||
-rw-r--r-- | src/redbook/wrap.c | 11 |
10 files changed, 0 insertions, 101 deletions
diff --git a/src/redbook/aapoly.c b/src/redbook/aapoly.c index 8a2d3202..b3c8f1df 100644 --- a/src/redbook/aapoly.c +++ b/src/redbook/aapoly.c @@ -82,7 +82,6 @@ static void drawCube(GLdouble x0, GLdouble x1, GLdouble y0, GLdouble y1, v[0][2] = v[1][2] = v[2][2] = v[3][2] = z0; v[4][2] = v[5][2] = v[6][2] = v[7][2] = z1; -#ifdef GL_VERSION_1_1 glEnableClientState (GL_VERTEX_ARRAY); glEnableClientState (GL_COLOR_ARRAY); glVertexPointer (3, GL_FLOAT, 0, v); @@ -90,11 +89,6 @@ static void drawCube(GLdouble x0, GLdouble x1, GLdouble y0, GLdouble y1, glDrawElements (GL_QUADS, NFACE*4, GL_UNSIGNED_BYTE, indices); glDisableClientState (GL_VERTEX_ARRAY); glDisableClientState (GL_COLOR_ARRAY); -#else - printf ("If this is GL Version 1.0, "); - printf ("vertex arrays are not supported.\n"); - exit(1); -#endif } /* Note: polygons must be drawn from front to back diff --git a/src/redbook/mvarray.c b/src/redbook/mvarray.c index 0e1a3051..60065c50 100644 --- a/src/redbook/mvarray.c +++ b/src/redbook/mvarray.c @@ -51,8 +51,6 @@ #include <stdlib.h> #include <stdio.h> -#ifdef GL_VERSION_1_3 - static void setupPointer(void) { static GLint vertices[] = {25, 25, @@ -125,12 +123,3 @@ int main(int argc, char** argv) glutMainLoop(); return 0; } -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates a feature which is not in OpenGL Version 1.0.\n"); - fprintf (stderr, "If your implementation of OpenGL Version 1.0 has the right extensions,\n"); - fprintf (stderr, "you may be able to modify this program to make it run.\n"); - return 0; -} -#endif diff --git a/src/redbook/polyoff.c b/src/redbook/polyoff.c index bf23db7c..41018900 100644 --- a/src/redbook/polyoff.c +++ b/src/redbook/polyoff.c @@ -46,7 +46,6 @@ #include <stdlib.h> #include <string.h> -#ifdef GL_VERSION_1_1 GLuint list; GLint fill = 1; GLfloat spinx = 0; @@ -312,12 +311,3 @@ int main(int argc, char** argv) glutMainLoop(); return 0; } -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates a feature which is not in OpenGL Version 1.0.\n"); - fprintf (stderr, "If your implementation of OpenGL Version 1.0 has the right extensions,\n"); - fprintf (stderr, "you may be able to modify this program to make it run.\n"); - return 0; -} -#endif diff --git a/src/redbook/texbind.c b/src/redbook/texbind.c index e7006d89..944b0d71 100644 --- a/src/redbook/texbind.c +++ b/src/redbook/texbind.c @@ -43,7 +43,6 @@ #include <stdlib.h> #include <stdio.h> -#ifdef GL_VERSION_1_1 /* Create checkerboard texture */ #define checkImageWidth 64 #define checkImageHeight 64 @@ -160,12 +159,3 @@ int main(int argc, char** argv) glutMainLoop(); return 0; } -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates a feature which is not in OpenGL Version 1.0.\n"); - fprintf (stderr, "If your implementation of OpenGL Version 1.0 has the right extensions,\n"); - fprintf (stderr, "you may be able to modify this program to make it run.\n"); - return 0; -} -#endif diff --git a/src/redbook/texgen.c b/src/redbook/texgen.c index b2cc3f20..660c0ab1 100644 --- a/src/redbook/texgen.c +++ b/src/redbook/texgen.c @@ -56,9 +56,7 @@ #define stripeImageWidth 32 GLubyte stripeImage[4*stripeImageWidth]; -#ifdef GL_VERSION_1_1 static GLuint texName; -#endif static void makeStripeImage(void) { @@ -88,20 +86,13 @@ static void init(void) makeStripeImage(); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); -#ifdef GL_VERSION_1_1 glGenTextures(1, &texName); glBindTexture(GL_TEXTURE_1D, texName); -#endif glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); -#ifdef GL_VERSION_1_1 glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA, stripeImageWidth, 0, GL_RGBA, GL_UNSIGNED_BYTE, stripeImage); -#else - glTexImage1D(GL_TEXTURE_1D, 0, 4, stripeImageWidth, 0, - GL_RGBA, GL_UNSIGNED_BYTE, stripeImage); -#endif glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); currentCoeff = xequalzero; @@ -128,9 +119,7 @@ static void display(void) glPushMatrix (); glRotatef(45.0, 0.0, 0.0, 1.0); -#ifdef GL_VERSION_1_1 glBindTexture(GL_TEXTURE_1D, texName); -#endif glutSolidTeapot(2.0); glPopMatrix (); glFlush(); diff --git a/src/redbook/texprox.c b/src/redbook/texprox.c index 057ea4d2..b186982c 100644 --- a/src/redbook/texprox.c +++ b/src/redbook/texprox.c @@ -45,8 +45,6 @@ #include <stdlib.h> #include <stdio.h> -#ifdef GL_VERSION_1_1 - /* Microsoft OpenGL 1.1's <GL/gl.h> forgets to define GL_TEXTURE_INTERNAL_FORMAT. */ #ifndef GL_TEXTURE_INTERNAL_FORMAT @@ -109,12 +107,3 @@ int main(int argc, char** argv) glutMainLoop(); return 0; } -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates a feature which is not in OpenGL Version 1.0.\n"); - fprintf (stderr, "If your implementation of OpenGL Version 1.0 has the right extensions,\n"); - fprintf (stderr, "you may be able to modify this program to make it run.\n"); - return 0; -} -#endif diff --git a/src/redbook/texsub.c b/src/redbook/texsub.c index eafb7813..16a84704 100644 --- a/src/redbook/texsub.c +++ b/src/redbook/texsub.c @@ -47,7 +47,6 @@ #include <stdlib.h> #include <stdio.h> -#ifdef GL_VERSION_1_1 /* Create checkerboard textures */ #define checkImageWidth 64 #define checkImageHeight 64 @@ -176,12 +175,3 @@ int main(int argc, char** argv) glutMainLoop(); return 0; } -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates a feature which is not in OpenGL Version 1.0.\n"); - fprintf (stderr, "If your implementation of OpenGL Version 1.0 has the right extensions,\n"); - fprintf (stderr, "you may be able to modify this program to make it run.\n"); - return 0; -} -#endif diff --git a/src/redbook/texture3d.c b/src/redbook/texture3d.c index c865eef2..a7319d6a 100644 --- a/src/redbook/texture3d.c +++ b/src/redbook/texture3d.c @@ -51,7 +51,6 @@ #include <stdlib.h> #include <stdio.h> -#ifdef GL_VERSION_1_2 #define iWidth 16 #define iHeight 16 #define iDepth 16 @@ -151,13 +150,3 @@ int main(int argc, char** argv) glutMainLoop(); return 0; } -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates a feature which is not in OpenGL Version 1.0 or 1.1.\n"); - fprintf (stderr, "If your implementation of OpenGL has the right extensions,\n"); - fprintf (stderr, "you may be able to modify this program to make it run.\n"); - return 0; -} -#endif - diff --git a/src/redbook/varray.c b/src/redbook/varray.c index 81c70b51..a7730224 100644 --- a/src/redbook/varray.c +++ b/src/redbook/varray.c @@ -43,7 +43,6 @@ #include <stdio.h> #include <stdlib.h> -#ifdef GL_VERSION_1_1 #define POINTER 1 #define INTERLEAVED 2 @@ -184,12 +183,3 @@ int main(int argc, char** argv) glutMainLoop(); return 0; } -#else -int main(int argc, char** argv) -{ - fprintf (stderr, "This program demonstrates a feature which is not in OpenGL Version 1.0.\n"); - fprintf (stderr, "If your implementation of OpenGL Version 1.0 has the right extensions,\n"); - fprintf (stderr, "you may be able to modify this program to make it run.\n"); - return 0; -} -#endif diff --git a/src/redbook/wrap.c b/src/redbook/wrap.c index 9c886aef..6365282d 100644 --- a/src/redbook/wrap.c +++ b/src/redbook/wrap.c @@ -55,9 +55,7 @@ #define checkImageHeight 64 static GLubyte checkImage[checkImageHeight][checkImageWidth][4]; -#ifdef GL_VERSION_1_1 static GLuint texName; -#endif static void makeCheckImage(void) { @@ -83,22 +81,15 @@ static void init(void) makeCheckImage(); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); -#ifdef GL_VERSION_1_1 glGenTextures(1, &texName); glBindTexture(GL_TEXTURE_2D, texName); -#endif glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); -#ifdef GL_VERSION_1_1 glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, checkImageWidth, checkImageHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, checkImage); -#else - glTexImage2D(GL_TEXTURE_2D, 0, 4, checkImageWidth, checkImageHeight, - 0, GL_RGBA, GL_UNSIGNED_BYTE, checkImage); -#endif } static void display(void) @@ -106,9 +97,7 @@ static void display(void) glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glEnable(GL_TEXTURE_2D); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL); -#ifdef GL_VERSION_1_1 glBindTexture(GL_TEXTURE_2D, texName); -#endif glBegin(GL_QUADS); glTexCoord2f(0.0, 0.0); glVertex3f(-2.0, -1.0, 0.0); |