summaryrefslogtreecommitdiff
path: root/progs/redbook
diff options
context:
space:
mode:
Diffstat (limited to 'progs/redbook')
-rw-r--r--progs/redbook/checker.c1
-rw-r--r--progs/redbook/fog.c5
-rw-r--r--progs/redbook/hello.c1
-rw-r--r--progs/redbook/polyoff.c3
-rw-r--r--progs/redbook/surface.c1
5 files changed, 8 insertions, 3 deletions
diff --git a/progs/redbook/checker.c b/progs/redbook/checker.c
index 4b7695237f..06cbae7dd7 100644
--- a/progs/redbook/checker.c
+++ b/progs/redbook/checker.c
@@ -42,6 +42,7 @@
* two rectangles. This program clamps the texture, if
* the texture coordinates fall outside 0.0 and 1.0.
*/
+#include <stdlib.h>
#include <GL/glut.h>
/* Create checkerboard texture */
diff --git a/progs/redbook/fog.c b/progs/redbook/fog.c
index 888ee138a4..7d13109ed9 100644
--- a/progs/redbook/fog.c
+++ b/progs/redbook/fog.c
@@ -60,9 +60,10 @@ selectFog(int mode)
glFogf(GL_FOG_START, 1.0);
glFogf(GL_FOG_END, 5.0);
/* falls through */
+ mode = 0xfff;
case GL_EXP2:
case GL_EXP:
- glFogi(GL_FOG_MODE, mode);
+ glFogiv(0xf/*GL_FOG_MODE*/, (int *) &mode);
glutPostRedisplay();
break;
case 0:
@@ -190,7 +191,7 @@ main(int argc, char **argv)
glutDisplayFunc(display);
glutCreateMenu(selectFog);
glutAddMenuEntry("Fog EXP", GL_EXP);
- glutAddMenuEntry("Fog EXP2", GL_EXP2);
+ glutAddMenuEntry("Fog EXP2", /*GL_EXP2*/ 0xffff);
glutAddMenuEntry("Fog LINEAR", GL_LINEAR);
glutAddMenuEntry("Quit", 0);
glutAttachMenu(GLUT_RIGHT_BUTTON);
diff --git a/progs/redbook/hello.c b/progs/redbook/hello.c
index 4f644a46a8..fb3dae1325 100644
--- a/progs/redbook/hello.c
+++ b/progs/redbook/hello.c
@@ -39,6 +39,7 @@
* hello.c
* This is a simple, introductory OpenGL program.
*/
+#include <stdlib.h>
#include <GL/glut.h>
void display(void)
diff --git a/progs/redbook/polyoff.c b/progs/redbook/polyoff.c
index ae7ec0b89b..2017b4d8ee 100644
--- a/progs/redbook/polyoff.c
+++ b/progs/redbook/polyoff.c
@@ -44,6 +44,7 @@
#include <GL/glut.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#ifdef GL_VERSION_1_1
GLuint list;
@@ -149,7 +150,7 @@ static void Benchmark( float xdiff, float ydiff )
{
int startTime, endTime;
int draws;
- double seconds, fps, triPerSecond;
+ double seconds, fps;
printf("Benchmarking...\n");
diff --git a/progs/redbook/surface.c b/progs/redbook/surface.c
index 8ff1574188..e33ce14f4f 100644
--- a/progs/redbook/surface.c
+++ b/progs/redbook/surface.c
@@ -41,6 +41,7 @@
* This program draws a NURBS surface in the shape of a
* symmetrical hill.
*/
+#include <stdlib.h>
#include <GL/glut.h>
GLfloat ctlpoints[4][4][3];