Merge branch 'mesa_7_6_branch' into mesa_7_7_branch
authorBrian Paul <brianp@vmware.com>
Tue, 22 Dec 2009 01:23:53 +0000 (18:23 -0700)
committerBrian Paul <brianp@vmware.com>
Tue, 22 Dec 2009 01:23:53 +0000 (18:23 -0700)
Conflicts:
configure.ac
progs/demos/morph3d.c
progs/demos/textures.c
progs/glsl/shtest.c
progs/glsl/texaaline.c
progs/tests/packedpixels.c
progs/xdemos/corender.c
src/mesa/main/version.h

91 files changed:
progs/demos/textures.c
progs/glsl/shtest.c
progs/glsl/texaaline.c
progs/redbook/aapoly.c
progs/redbook/aargb.c
progs/redbook/accanti.c
progs/redbook/accpersp.c
progs/redbook/alpha.c
progs/redbook/alpha3D.c
progs/redbook/anti.c
progs/redbook/bezcurve.c
progs/redbook/bezmesh.c
progs/redbook/checker.c
progs/redbook/clip.c
progs/redbook/colormat.c
progs/redbook/cube.c
progs/redbook/depthcue.c
progs/redbook/dof.c
progs/redbook/double.c
progs/redbook/drawf.c
progs/redbook/feedback.c
progs/redbook/fog.c
progs/redbook/fogindex.c
progs/redbook/font.c
progs/redbook/hello.c
progs/redbook/image.c
progs/redbook/light.c
progs/redbook/lines.c
progs/redbook/list.c
progs/redbook/material.c
progs/redbook/mipmap.c
progs/redbook/model.c
progs/redbook/movelight.c
progs/redbook/nurbs.c
progs/redbook/pickdepth.c
progs/redbook/picksquare.c
progs/redbook/plane.c
progs/redbook/planet.c
progs/redbook/polyoff.c
progs/redbook/polys.c
progs/redbook/quadric.c
progs/redbook/robot.c
progs/redbook/sccolorlight.c
progs/redbook/scene.c
progs/redbook/scenebamb.c
progs/redbook/sceneflat.c
progs/redbook/select.c
progs/redbook/smooth.c
progs/redbook/stencil.c
progs/redbook/stroke.c
progs/redbook/surface.c
progs/redbook/teaambient.c
progs/redbook/teapots.c
progs/redbook/tess.c
progs/redbook/tesswind.c
progs/redbook/texbind.c
progs/redbook/texgen.c
progs/redbook/texprox.c
progs/redbook/texsub.c
progs/redbook/texturesurf.c
progs/redbook/torus.c
progs/redbook/trim.c
progs/redbook/unproject.c
progs/redbook/varray.c
progs/redbook/wrap.c
progs/tests/bug_texstore_i8.c
progs/tests/crossbar.c
progs/tests/fptest1.c
progs/tests/invert.c
progs/tests/packedpixels.c
progs/tests/quads.c
progs/tests/scissor-viewport.c
progs/tests/scissor.c
progs/tests/stencilwrap.c
progs/tests/tex1d.c
progs/tests/unfilledclip.c
progs/trivial/clear-fbo-tex.c
progs/trivial/createwin.c
progs/trivial/dlist-begin-call-end.c
progs/trivial/draw2arrays.c
progs/trivial/drawarrays.c
progs/trivial/tri-fp.c
progs/trivial/tri-logicop-none.c
progs/trivial/tri-logicop-xor.c
progs/trivial/vbo-drawarrays.c
progs/trivial/vbo-noninterleaved.c
progs/xdemos/corender.c
src/mesa/drivers/dri/r600/r700_state.c
src/mesa/main/dlopen.c
src/mesa/shader/slang/slang_compile.c
src/mesa/state_tracker/st_gen_mipmap.c

index d94154a2008f6497146e296319c98509c8ab9865..31e1bbb3db0631b91fc340c0fbfc199a663c7862 100644 (file)
@@ -57,7 +57,7 @@ Idle(void)
 {
    Xrot = glutGet(GLUT_ELAPSED_TIME) * 0.02;
    Yrot = glutGet(GLUT_ELAPSED_TIME) * 0.04;
-   /*Zrot += 2.0;*/
+   /* Zrot += 2.0; */
    glutPostRedisplay();
 }
 
index 9d76e018e3780ff773229a87f021bf3d8c624637..88315d746148a86073db06498f31bb3d36ba4fd1 100644 (file)
@@ -627,7 +627,7 @@ Init(void)
    NumAttribs = GetAttribs(Program, Attribs);
    PrintAttribs(Attribs);
 
-   /*assert(glGetError() == 0);*/
+   /* assert(glGetError() == 0); */
 
    glClearColor(0.4f, 0.4f, 0.8f, 0.0f);
 
index 4ad5a761c67f04f4f77bfd995c5a4ba8fd36d2ef..00edab731088fbf0f8573c461a9a41538874fbf8 100644 (file)
@@ -310,10 +310,8 @@ MakeMipmap(void)
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-   /*
-   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 4);
-   glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 5);
-   */
+   /* glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LOD, 4); */
+   /* glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 5); */
 
    glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
 #undef SZ
index 757f0f48c43278f8a94f0ec95bece2a0186cae1b..b7b2b270902f5cd792c3a7e0baaa79d16769163b 100644 (file)
@@ -59,7 +59,7 @@ static void init(void)
 
 #define NFACE 6
 #define NVERT 8
-void drawCube(GLdouble x0, GLdouble x1, GLdouble y0, GLdouble y1,
+static void drawCube(GLdouble x0, GLdouble x1, GLdouble y0, GLdouble y1,
         GLdouble z0, GLdouble z1)
 {
    static GLfloat v[8][3];
@@ -101,7 +101,7 @@ void drawCube(GLdouble x0, GLdouble x1, GLdouble y0, GLdouble y1,
 /*  Note:  polygons must be drawn from front to back
  *  for proper blending.
  */
-void display(void)
+static void display(void)
 {
    if (polySmooth) {
       glClear (GL_COLOR_BUFFER_BIT);
@@ -126,7 +126,7 @@ void display(void)
    glFlush ();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -137,7 +137,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 't':
index f51984170e6811b607d627e67777c42044a76f75..0021b549c2e502c0f88353fd0dbacd8594bed4bb 100644 (file)
@@ -51,7 +51,7 @@ static float rotAngle = 0.;
  *  blending, hint, and line width.  Print out implementation
  *  specific info on line width granularity and width.
  */
-void init(void)
+static void init(void)
 {
    GLfloat values[2];
    glGetFloatv (GL_LINE_WIDTH_GRANULARITY, values);
@@ -72,7 +72,7 @@ void init(void)
 
 /* Draw 2 diagonal lines to form an X
  */
-void display(void)
+static void display(void)
 {
    glClear(GL_COLOR_BUFFER_BIT);
 
@@ -97,7 +97,7 @@ void display(void)
    glFlush();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, w, h);
    glMatrixMode(GL_PROJECTION);
@@ -113,7 +113,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 'r':
index 12ca16f7a52d3841242adff9a3b5f594453e091c..d1b25678419fcf59ab1774dfde655366f2806fdc 100644 (file)
@@ -45,7 +45,7 @@
 
 /*  Initialize lighting and other values.
  */
-void myinit(void)
+static void myinit(void)
 {
     GLfloat mat_ambient[] = { 1.0, 1.0, 1.0, 1.0 };
     GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -68,7 +68,7 @@ void myinit(void)
     glClearAccum(0.0, 0.0, 0.0, 0.0);
 }
 
-void displayObjects(void)
+static void displayObjects(void)
 {
     GLfloat torus_diffuse[] = { 0.7, 0.7, 0.0, 1.0 };
     GLfloat cube_diffuse[] = { 0.0, 0.7, 0.7, 1.0 };
@@ -111,7 +111,7 @@ void displayObjects(void)
 
 #define ACSIZE 8
 
-void display(void)
+static void display(void)
 {
     GLint viewport[4];
     int jitter;
@@ -137,7 +137,7 @@ void display(void)
     glFlush();
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
     glMatrixMode(GL_PROJECTION);
index 46e369ae631163a6c10d42d5a9deac3d6cb03510..e172d0a917f76a2806ca98e8a8016ee23bbb8808 100644 (file)
@@ -62,7 +62,7 @@
  * probably want to insure that your ModelView matrix has been 
  * initialized to identity before calling accFrustum().
  */
-void accFrustum(GLdouble left, GLdouble right, GLdouble bottom, 
+static void accFrustum(GLdouble left, GLdouble right, GLdouble bottom, 
    GLdouble top, GLdouble nnear, GLdouble ffar, GLdouble pixdx, 
    GLdouble pixdy, GLdouble eyedx, GLdouble eyedy, GLdouble focus)
 {
@@ -99,7 +99,7 @@ void accFrustum(GLdouble left, GLdouble right, GLdouble bottom,
  *
  * Note that accPerspective() calls accFrustum().
  */
-void accPerspective(GLdouble fovy, GLdouble aspect, 
+static void accPerspective(GLdouble fovy, GLdouble aspect, 
    GLdouble nnear, GLdouble ffar, GLdouble pixdx, GLdouble pixdy, 
    GLdouble eyedx, GLdouble eyedy, GLdouble focus)
 {
@@ -119,7 +119,7 @@ void accPerspective(GLdouble fovy, GLdouble aspect,
 
 /*  Initialize lighting and other values.
  */
-void init(void)
+static void init(void)
 {
    GLfloat mat_ambient[] = { 1.0, 1.0, 1.0, 1.0 };
    GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -141,7 +141,7 @@ void init(void)
    glClearAccum(0.0, 0.0, 0.0, 0.0);
 }
 
-void displayObjects(void) 
+static void displayObjects(void) 
 {
    GLfloat torus_diffuse[] = { 0.7, 0.7, 0.0, 1.0 };
    GLfloat cube_diffuse[] = { 0.0, 0.7, 0.7, 1.0 };
@@ -185,7 +185,7 @@ void displayObjects(void)
 
 #define ACSIZE 8
 
-void display(void)
+static void display(void)
 {
    GLint viewport[4];
    int jitter;
@@ -205,13 +205,13 @@ void display(void)
    glFlush();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index 6eeb45b96f1812dbba1d4df10c68c44630e475f2..b77c65e2c8346a5b5751e2a921cc1f3c0990894d 100644 (file)
@@ -80,7 +80,7 @@ static void drawRightTriangle(void)
    glEnd();
 }
 
-void display(void)
+static void display(void)
 {
    glClear(GL_COLOR_BUFFER_BIT);
 
@@ -96,7 +96,7 @@ void display(void)
    glFlush();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -108,7 +108,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 't':
index 6169bd162beeed3dc67b0e63eb0ae432215dd2d5..494b1879d228fb002396300410cca4c7b449ff2f 100644 (file)
@@ -80,7 +80,7 @@ static void init(void)
    glEndList();
 }
 
-void display(void)
+static void display(void)
 {
    GLfloat mat_solid[] = { 0.75, 0.75, 0.0, 1.0 };
    GLfloat mat_zero[] = { 0.0, 0.0, 0.0, 1.0 };
@@ -113,7 +113,7 @@ void display(void)
    glutSwapBuffers();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLint) w, (GLint) h);
    glMatrixMode(GL_PROJECTION);
@@ -128,7 +128,7 @@ void reshape(int w, int h)
    glLoadIdentity();
 }
 
-void animate(void)
+static void animate(void)
 {
    static double t0 = -1.;
    if (solidZ <= MINZ || transparentZ >= MAXZ)
@@ -150,7 +150,7 @@ void animate(void)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 'a':
index 9eab0bc35111bc85da4a3a0d67a1869a3185a32f..a97a3ebc948c7ba54f58e68a915106a53629d18c 100644 (file)
@@ -49,7 +49,7 @@
  *  blending, hint, and line width.  Print out implementation
  *  specific info on line width granularity and width.
  */
-void myinit(void)
+static void myinit(void)
 {
     GLfloat values[2];
     glGetFloatv (GL_LINE_WIDTH_GRANULARITY, values);
@@ -73,7 +73,7 @@ void myinit(void)
 
 /*  display() draws an icosahedron with a large alpha value, 1.0.
  */
-void display(void)
+static void display(void)
 {
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     glColor4f (1.0, 1.0, 1.0, 1.0);
@@ -81,7 +81,7 @@ void display(void)
     glFlush();
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
     glMatrixMode(GL_PROJECTION);
index 5dee440396b8a0973b2142931080dc9946640357..60a9c680802a802de9c12f0569f37467503db17a 100644 (file)
@@ -45,7 +45,7 @@ GLfloat ctrlpoints[4][3] = {
        { -4.0, -4.0, 0.0}, { -2.0, 4.0, 0.0}, 
        {2.0, -4.0, 0.0}, {4.0, 4.0, 0.0}};
 
-void init(void)
+static void init(void)
 {
    glClearColor(0.0, 0.0, 0.0, 0.0);
    glShadeModel(GL_FLAT);
@@ -53,7 +53,7 @@ void init(void)
    glEnable(GL_MAP1_VERTEX_3);
 }
 
-void display(void)
+static void display(void)
 {
    int i;
 
@@ -73,7 +73,7 @@ void display(void)
    glFlush();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -89,7 +89,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index 55e7e827f2b4aa632e712ad1d9756560be0b9013..1abc7488bcb642da04174edf0449e0f6deea1d92 100644 (file)
@@ -68,7 +68,7 @@ GLfloat ctrlpoints[4][4][3] =
         {1.5, 1.5, -1.0}}
 };
 
-void
+static void
 initlights(void)
 {
     GLfloat ambient[] =
@@ -93,7 +93,7 @@ initlights(void)
     glMaterialfv(GL_FRONT, GL_SHININESS, mat_shininess);
 }
 
-void
+static void
 display(void)
 {
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -104,7 +104,7 @@ display(void)
     glFlush();
 }
 
-void
+static void
 myinit(void)
 {
     glClearColor(0.0, 0.0, 0.0, 1.0);
@@ -118,7 +118,7 @@ myinit(void)
     initlights();       /* for lighted version only */
 }
 
-void
+static void
 myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
index 06cbae7dd7eee193b8a8368a6d7030f6815c6e82..60e6f7b60c818e802d4c68844ec8fbac736345d4 100644 (file)
@@ -50,7 +50,7 @@
 #define        checkImageHeight 64
 GLubyte checkImage[checkImageWidth][checkImageHeight][3];
 
-void makeCheckImage(void)
+static void makeCheckImage(void)
 {
     int i, j, c;
 
@@ -64,7 +64,7 @@ void makeCheckImage(void)
     }
 }
 
-void myinit(void)
+static void myinit(void)
 {
     glClearColor (0.0, 0.0, 0.0, 0.0);
     glEnable(GL_DEPTH_TEST);
@@ -84,7 +84,7 @@ void myinit(void)
     glShadeModel(GL_FLAT);
 }
 
-void display(void)
+static void display(void)
 {
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     glBegin(GL_QUADS);
@@ -101,7 +101,7 @@ void display(void)
     glutSwapBuffers();
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
     glMatrixMode(GL_PROJECTION);
index 90816f2e278cbb09bc7708bdb428b4c49f291ef6..85c464720db64a7776bd749afd36acd92962c958 100644 (file)
 #include <GL/glut.h>
 #include <stdlib.h>
 
-void init(void) 
+static void init(void) 
 {
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glShadeModel (GL_FLAT);
 }
 
-void display(void)
+static void display(void)
 {
    GLdouble eqn[4] = {0.0, 1.0, 0.0, 0.0};
    GLdouble eqn2[4] = {1.0, 0.0, 0.0, 0.0};
@@ -73,7 +73,7 @@ void display(void)
    glFlush ();
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h); 
    glMatrixMode (GL_PROJECTION);
@@ -83,7 +83,7 @@ void reshape (int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index 9db4491bac5b5c41722b4681718570aff1f50607..d77fcb1ed46739d26945b49995bd86e0ea3bc725 100644 (file)
@@ -49,7 +49,7 @@ GLfloat diffuseMaterial[4] = { 0.5, 0.5, 0.5, 1.0 };
 /*  Initialize material property, light source, lighting model,
  *  and depth buffer.
  */
-void init(void) 
+static void init(void) 
 {
    GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
    GLfloat light_position[] = { 1.0, 1.0, 1.0, 0.0 };
@@ -68,14 +68,14 @@ void init(void)
    glEnable(GL_COLOR_MATERIAL);
 }
 
-void display(void)
+static void display(void)
 {
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glutSolidSphere(1.0, 20, 16);
    glFlush ();
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode (GL_PROJECTION);
@@ -91,7 +91,7 @@ void reshape (int w, int h)
 }
 
 /* ARGSUSED2 */
-void mouse(int button, int state, int x, int y)
+static void mouse(int button, int state, int x, int y)
 {
    switch (button) {
       case GLUT_LEFT_BUTTON:
@@ -127,7 +127,7 @@ void mouse(int button, int state, int x, int y)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index 5ecc6280f3315370107b407394ab8dce1c451402..3c6becb2157ed3b87c3f83fbd5d2cd2f97d7f665 100644 (file)
 #include <GL/glut.h>
 #include <stdlib.h>
 
-void init(void) 
+static void init(void) 
 {
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glShadeModel (GL_FLAT);
 }
 
-void display(void)
+static void display(void)
 {
    glClear (GL_COLOR_BUFFER_BIT);
    glColor3f (1.0, 1.0, 1.0);
@@ -62,7 +62,7 @@ void display(void)
    glFlush ();
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h); 
    glMatrixMode (GL_PROJECTION);
@@ -72,7 +72,7 @@ void reshape (int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index a3e5b743aa724f366985b466dee2e2419ae1ac79..d4b604baf134271010b4517895b80e6c2cfac0e6 100644 (file)
@@ -48,7 +48,7 @@
 
 /*  Initialize linear fog for depth cueing.
  */
-void myinit(void)
+static void myinit(void)
 {
     GLfloat fogColor[4] = {0.0, 0.0, 0.0, 1.0};
 
@@ -67,7 +67,7 @@ void myinit(void)
 
 /*  display() draws an icosahedron.
  */
-void display(void)
+static void display(void)
 {
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     glColor3f (1.0, 1.0, 1.0);
@@ -75,7 +75,7 @@ void display(void)
     glFlush();
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
     glMatrixMode(GL_PROJECTION);
index 6673dc2d54f7284a0f6e3741f052a24b18903b57..8558f02deea0e8c39eeaf1c9669dacbf5417b677 100644 (file)
@@ -68,7 +68,7 @@
  *  probably want to insure that your ModelView matrix has been
  *  initialized to identity before calling accFrustum().
  */
-void accFrustum(GLdouble left, GLdouble right, GLdouble bottom,
+static void accFrustum(GLdouble left, GLdouble right, GLdouble bottom,
     GLdouble top, GLdouble nnear, GLdouble ffar, GLdouble pixdx,
     GLdouble pixdy, GLdouble eyedx, GLdouble eyedy, GLdouble focus)
 {
@@ -105,7 +105,7 @@ void accFrustum(GLdouble left, GLdouble right, GLdouble bottom,
  *
  *  Note that accPerspective() calls accFrustum().
  */
-void accPerspective(GLdouble fovy, GLdouble aspect,
+static void accPerspective(GLdouble fovy, GLdouble aspect,
     GLdouble nnear, GLdouble ffar, GLdouble pixdx, GLdouble pixdy,
     GLdouble eyedx, GLdouble eyedy, GLdouble focus)
 {
@@ -123,7 +123,7 @@ void accPerspective(GLdouble fovy, GLdouble aspect,
        pixdx, pixdy, eyedx, eyedy, focus);
 }
 
-void myinit(void)
+static void myinit(void)
 {
     GLfloat ambient[] = { 0.0, 0.0, 0.0, 1.0 };
     GLfloat diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -155,7 +155,7 @@ void myinit(void)
     glClearAccum(0.0, 0.0, 0.0, 0.0);
 }
 
-void renderTeapot (GLfloat x, GLfloat y, GLfloat z,
+static void renderTeapot (GLfloat x, GLfloat y, GLfloat z,
     GLfloat ambr, GLfloat ambg, GLfloat ambb,
     GLfloat difr, GLfloat difg, GLfloat difb,
     GLfloat specr, GLfloat specg, GLfloat specb, GLfloat shine)
@@ -182,7 +182,7 @@ void renderTeapot (GLfloat x, GLfloat y, GLfloat z,
  *  magnitude of the accPerspective() jitter; in this example, 0.33.
  *  In this example, the teapots are drawn 8 times.  See jitter.h
  */
-void display(void)
+static void display(void)
 {
     int jitter;
     GLint viewport[4];
@@ -214,7 +214,7 @@ void display(void)
     glFlush();
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
 }
index 3153c70cc1d60c7b99d13ca1d608d1d15e30d165..c4ead224dc8b1d91d8757407fcbda4efcac8727e 100644 (file)
@@ -47,7 +47,7 @@
 static GLfloat spin = 0.0;
 static GLdouble t0 = 0.;
 
-void display(void)
+static void display(void)
 {
    glClear(GL_COLOR_BUFFER_BIT);
    glPushMatrix();
@@ -59,12 +59,12 @@ void display(void)
    glutSwapBuffers();
 }
 
-GLdouble gettime(void)
+static GLdouble gettime(void)
 {
     return (GLdouble)(glutGet(GLUT_ELAPSED_TIME)) / 1000.;
 }
 
-void spinDisplay(void)
+static void spinDisplay(void)
 {
    GLdouble t, dt;
    t = gettime();
@@ -76,13 +76,13 @@ void spinDisplay(void)
    glutPostRedisplay();
 }
 
-void init(void)
+static void init(void)
 {
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glShadeModel (GL_FLAT);
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -93,7 +93,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED2 */
-void mouse(int button, int state, int x, int y)
+static void mouse(int button, int state, int x, int y)
 {
    switch (button) {
       case GLUT_LEFT_BUTTON:
index 5bcccb6aeac3ed555c6f79318d1a5a1a871fd2a7..6c048be784492fd8745abc85c31444187a80d57e 100644 (file)
@@ -48,13 +48,13 @@ GLubyte rasters[24] = {
    0xff, 0x00, 0xff, 0x00, 0xc0, 0x00, 0xc0, 0x00, 0xc0, 0x00,
    0xff, 0xc0, 0xff, 0xc0};
 
-void init(void)
+static void init(void)
 {
    glPixelStorei (GL_UNPACK_ALIGNMENT, 1);
    glClearColor (0.0, 0.0, 0.0, 0.0);
 }
 
-void display(void)
+static void display(void)
 {
    glClear(GL_COLOR_BUFFER_BIT);
    glColor3f (1.0, 1.0, 1.0);
@@ -65,7 +65,7 @@ void display(void)
    glFlush();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -75,7 +75,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index cc685d55d34d7a5c837f4ff2c892d2772f745ed0..3c8c8cc7eaf90532b3503b74cb77f722f08d79d9 100644 (file)
@@ -48,7 +48,7 @@
 
 /*  Initialize lighting.
  */
-void init(void)
+static void init(void)
 {
    glEnable(GL_LIGHTING);
    glEnable(GL_LIGHT0);
@@ -58,7 +58,7 @@ void init(void)
  * be clipped.  If in feedback mode, a passthrough token 
  * is issued between the each primitive.
  */
-void drawGeometry (GLenum mode)
+static void drawGeometry (GLenum mode)
 {
    glBegin (GL_LINE_STRIP);
    glNormal3f (0.0, 0.0, 1.0);
@@ -80,8 +80,8 @@ void drawGeometry (GLenum mode)
 }
 
 /* Write contents of one vertex to stdout.     */
-void print3DcolorVertex (GLint size, GLint *count, 
-                         GLfloat *buffer)
+static void print3DcolorVertex (GLint size, GLint *count, 
+                                GLfloat *buffer)
 {
    int i;
 
@@ -94,7 +94,7 @@ void print3DcolorVertex (GLint size, GLint *count,
 }
 
 /*  Write contents of entire buffer.  (Parse tokens!)  */
-void printBuffer(GLint size, GLfloat *buffer)
+static void printBuffer(GLint size, GLfloat *buffer)
 {
    GLint count;
    GLfloat token;
@@ -124,7 +124,7 @@ void printBuffer(GLint size, GLfloat *buffer)
    }
 }
 
-void display(void)
+static void display(void)
 {
    GLfloat feedBuffer[1024];
    GLint size;
@@ -148,7 +148,7 @@ void display(void)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index 14c7700eccfe960f4413fc73247807b8e816c725..4f4b8e3cc0af26b8a85ac1760b226f9e9f62ad84 100644 (file)
@@ -52,7 +52,7 @@
 
 GLint fogMode;
 
-void
+static void
 selectFog(int mode)
 {
     switch(mode) {
@@ -73,7 +73,7 @@ selectFog(int mode)
 /*  Initialize z-buffer, projection matrix, light source,
  *  and lighting model.  Do not specify a material property here.
  */
-void
+static void
 myinit(void)
 {
     GLfloat position[] =
@@ -106,7 +106,7 @@ myinit(void)
     }
 }
 
-void
+static void
 renderRedTeapot(GLfloat x, GLfloat y, GLfloat z)
 {
     float mat[4];
@@ -133,7 +133,7 @@ renderRedTeapot(GLfloat x, GLfloat y, GLfloat z)
 
 /*  display() draws 5 teapots at different z positions.
  */
-void
+static void
 display(void)
 {
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -145,7 +145,7 @@ display(void)
     glFlush();
 }
 
-void
+static void
 myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
index b8bb691e2886fb38023b5efc023209137bc61b2b..6b5aa353caa070ced5daaf6858a7a5304b942a8f 100644 (file)
@@ -53,7 +53,7 @@
 #define NUM_COLORS 32
 #define RAMPSTART 16
 
-void
+static void
 myinit(void)
 {
   int i;
@@ -77,7 +77,7 @@ myinit(void)
 
 /*  display() renders 3 cones at different z positions.
  */
-void
+static void
 display(void)
 {
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -104,7 +104,7 @@ display(void)
   glFlush();
 }
 
-void
+static void
 myReshape(int w, int h)
 {
   glViewport(0, 0, w, h);
index 2d92e9b600395bb5eda9b2c2b45274abe16f6707..c7a1035aa99ae1ef66151f40725e920cfebf7bbc 100644 (file)
@@ -80,7 +80,7 @@ GLubyte letters[][13] = {
 
 GLuint fontOffset;
 
-void makeRasterFont(void)
+static void makeRasterFont(void)
 {
    GLuint i, j;
    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
@@ -96,13 +96,13 @@ void makeRasterFont(void)
    glEndList();
 }
 
-void init(void)
+static void init(void)
 {
    glShadeModel (GL_FLAT);
    makeRasterFont();
 }
 
-void printString(char *s)
+static void printString(char *s)
 {
    glPushAttrib (GL_LIST_BIT);
    glListBase(fontOffset);
@@ -115,7 +115,7 @@ void printString(char *s)
  * to call makeRasterFont() before you start making 
  * calls to printString().
  */
-void display(void)
+static void display(void)
 {
    GLfloat white[3] = { 1.0, 1.0, 1.0 };
 
@@ -129,7 +129,7 @@ void display(void)
    glFlush ();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -139,7 +139,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index fb3dae13252abdec3fe7175d34bd7a9358cd170e..84183b25b9fa1096a8f8840dcbccabb484380f56 100644 (file)
@@ -42,7 +42,7 @@
 #include <stdlib.h>
 #include <GL/glut.h>
 
-void display(void)
+static void display(void)
 {
 /* clear all pixels  */
    glClear (GL_COLOR_BUFFER_BIT);
@@ -64,7 +64,7 @@ void display(void)
    glFlush ();
 }
 
-void init (void)
+static void init (void)
 {
 /* select clearing color       */
    glClearColor (0.0, 0.0, 0.0, 0.0);
index dc1a7246eba9a11c61678f5ee36963634f616487..fa3b46f5ed4464b805e84ce69a943b98ad65bea7 100644 (file)
@@ -58,7 +58,7 @@ GLubyte checkImage[checkImageHeight][checkImageWidth][3];
 static GLdouble zoomFactor = 1.0;
 static GLint height;
 
-void makeCheckImage(void)
+static void makeCheckImage(void)
 {
    int i, j, c;
     
@@ -72,7 +72,7 @@ void makeCheckImage(void)
    }
 }
 
-void init(void)
+static void init(void)
 {    
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glShadeModel(GL_FLAT);
@@ -80,7 +80,7 @@ void init(void)
    glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
 }
 
-void display(void)
+static void display(void)
 {
    glClear(GL_COLOR_BUFFER_BIT);
    glRasterPos2i(0, 0);
@@ -89,7 +89,7 @@ void display(void)
    glFlush();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    height = (GLint) h;
@@ -100,7 +100,7 @@ void reshape(int w, int h)
    glLoadIdentity();
 }
 
-void motion(int x, int y)
+static void motion(int x, int y)
 {
    static GLint screeny;
    
@@ -113,7 +113,7 @@ void motion(int x, int y)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 'r':
index 0eed85e10c2043cd71eecab10a096ccd189589e6..9431dce508e19eafe20d983dcd55b986a756a585 100644 (file)
@@ -47,7 +47,7 @@
 /*  Initialize material property, light source, lighting model,
  *  and depth buffer.
  */
-void init(void) 
+static void init(void) 
 {
    GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
    GLfloat mat_shininess[] = { 50.0 };
@@ -65,14 +65,14 @@ void init(void)
    glEnable(GL_DEPTH_TEST);
 }
 
-void display(void)
+static void display(void)
 {
    glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glutSolidSphere (1.0, 20, 16);
    glFlush ();
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode (GL_PROJECTION);
@@ -88,7 +88,7 @@ void reshape (int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index b34d4c418c698baa7a58685879a945de55bc7dc0..9f12da9acfebaea1453467197b350485679e6661 100644 (file)
 #define drawOneLine(x1,y1,x2,y2)  glBegin(GL_LINES);  \
    glVertex2f ((x1),(y1)); glVertex2f ((x2),(y2)); glEnd();
 
-void init(void) 
+static void init(void) 
 {
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glShadeModel (GL_FLAT);
 }
 
-void display(void)
+static void display(void)
 {
    int i;
 
@@ -104,7 +104,7 @@ void display(void)
    glFlush ();
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode (GL_PROJECTION);
@@ -113,7 +113,7 @@ void reshape (int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index 3b4f44bd6dace54a744098816b7286ca7e892be2..5dea26fcad129bd946a1251c5cb416ec1177002a 100644 (file)
@@ -69,7 +69,7 @@ static void drawLine (void)
    glEnd ();
 }
 
-void display(void)
+static void display(void)
 {
    GLuint i;
 
@@ -82,7 +82,7 @@ void display(void)
    glFlush ();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, w, h);
    glMatrixMode(GL_PROJECTION);
@@ -97,7 +97,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index f9a4fc59288a1898b2b7183f1c48dec4579894e9..5edddd9ef8420f51722c599c59190e4fdb2839ef 100644 (file)
@@ -49,7 +49,7 @@
 /*  Initialize z-buffer, projection matrix, light source,
  *  and lighting model.  Do not specify a material property here.
  */
-void myinit(void)
+static void myinit(void)
 {
     GLfloat ambient[] = { 0.0, 0.0, 0.0, 1.0 };
     GLfloat diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -87,7 +87,7 @@ void myinit(void)
  *  glTranslatef() is used to move spheres to their appropriate locations.
  */
 
-void display(void)
+static void display(void)
 {
     GLfloat no_mat[] = { 0.0, 0.0, 0.0, 1.0 };
     GLfloat mat_ambient[] = { 0.7, 0.7, 0.7, 1.0 };
@@ -260,7 +260,7 @@ void display(void)
     glFlush();
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
     glMatrixMode(GL_PROJECTION);
index d32dd725f4b432005650695672007e21ab847b53..dadde055bef3d9a8b6bd1edca42bf51902e2afd9 100644 (file)
@@ -54,7 +54,7 @@ GLubyte mipmapImage4[4][4][3];
 GLubyte mipmapImage2[2][2][3];
 GLubyte mipmapImage1[1][1][3];
 
-void makeImages(void)
+static void makeImages(void)
 {
     int i, j;
 
@@ -98,7 +98,7 @@ void makeImages(void)
     mipmapImage1[0][0][2] = 255;
 }
 
-void myinit(void)
+static void myinit(void)
 {
     glEnable(GL_DEPTH_TEST);
     glDepthFunc(GL_LESS);
@@ -128,7 +128,7 @@ void myinit(void)
     glEnable(GL_TEXTURE_2D);
 }
 
-void display(void)
+static void display(void)
 {
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     glBegin(GL_QUADS);
@@ -140,7 +140,7 @@ void display(void)
     glFlush();
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
     glMatrixMode(GL_PROJECTION);
index 8411ef355f12688c5fe816743f752bd8cf95c638..f7c92f4f87caf9e7f067d633d60fa1562353e269 100644 (file)
 #include <GL/glut.h>
 #include <stdlib.h>
 
-void init(void) 
+static void init(void) 
 {
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glShadeModel (GL_FLAT);
 }
 
-void draw_triangle(void)
+static void draw_triangle(void)
 {
    glBegin (GL_LINE_LOOP);
    glVertex2f(0.0, 25.0);
@@ -57,7 +57,7 @@ void draw_triangle(void)
    glEnd();
 }
 
-void display(void)
+static void display(void)
 {
    glClear (GL_COLOR_BUFFER_BIT);
    glColor3f (1.0, 1.0, 1.0);
@@ -86,7 +86,7 @@ void display(void)
    glFlush ();
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode (GL_PROJECTION);
@@ -101,7 +101,7 @@ void reshape (int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index a108cad439aa4c04ec6ca715d872f101fa5723ce..93758a222a430f9a6b1a2b3fb1bbb353e18f0fed 100644 (file)
@@ -58,7 +58,7 @@ static int spin = 0;
 /*  Initialize material property, light source, lighting model,
  *  and depth buffer.
  */
-void init(void) 
+static void init(void) 
 {
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glShadeModel (GL_SMOOTH);
@@ -72,7 +72,7 @@ void init(void)
  *  light at a new position in world coordinates.  The cube
  *  represents the position of the light.
  */
-void display(void)
+static void display(void)
 {
    GLfloat position[] = { 0.0, 0.0, 1.5, 1.0 };
 
@@ -96,7 +96,7 @@ void display(void)
    glFlush ();
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode (GL_PROJECTION);
@@ -107,7 +107,7 @@ void reshape (int w, int h)
 }
 
 /* ARGSUSED2 */
-void mouse(int button, int state, int x, int y)
+static void mouse(int button, int state, int x, int y)
 {
    switch (button) {
       case GLUT_LEFT_BUTTON:
@@ -122,7 +122,7 @@ void mouse(int button, int state, int x, int y)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index a7c6f0c696e348dcf8ae90d001fbdc1ea21a62f7..fe03ce667ed796dfe54bfdb77d409464f02c0a84 100644 (file)
@@ -89,7 +89,7 @@ GLUnurbsObj *theNurb;
 /*  Initialize material property, light source, lighting model,
  *  and depth buffer.
  */
-void myinit(void)
+static void myinit(void)
 {
     GLfloat mat_ambient[] = { 1.0, 1.0, 1.0, 1.0 };
     GLfloat mat_diffuse[] = { 1.0, 0.2, 1.0, 1.0 };
@@ -122,7 +122,7 @@ void myinit(void)
     gluNurbsProperty(theNurb, GLU_DISPLAY_MODE, GLU_FILL);
 }
 
-void display(void)
+static void display(void)
 {
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
@@ -147,7 +147,7 @@ void display(void)
     glFlush();
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
     glMatrixMode(GL_PROJECTION);
index ad5bdc81994cb6466a07e69dc305cd6b24124e57..91d44a38c0a5fdd494a1e1ac483f307632485d75 100644 (file)
@@ -51,7 +51,7 @@
 #include <stdio.h>
 #include <GL/glut.h>
 
-void
+static void
 myinit(void)
 {
   glClearColor(0.0, 0.0, 0.0, 0.0);
@@ -65,7 +65,7 @@ myinit(void)
  *  each rectangle is given the same name.  Note that
  *  each rectangle is drawn with a different z value.
  */
-void
+static void
 drawRects(GLenum mode)
 {
   if (mode == GL_SELECT)
@@ -100,7 +100,7 @@ drawRects(GLenum mode)
 /*  processHits() prints out the contents of the
  *  selection array.
  */
-void
+static void
 processHits(GLint hits, GLuint buffer[])
 {
   GLint i;
@@ -131,7 +131,7 @@ processHits(GLint hits, GLuint buffer[])
  */
 #define BUFSIZE 512
 
-void
+static void
 pickRects(int button, int state, int x, int y)
 {
   GLuint selectBuf[BUFSIZE];
@@ -164,7 +164,7 @@ pickRects(int button, int state, int x, int y)
   processHits(hits, selectBuf);
 }
 
-void
+static void
 display(void)
 {
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -172,7 +172,7 @@ display(void)
   glutSwapBuffers();
 }
 
-void
+static void
 myReshape(int w, int h)
 {
   glViewport(0, 0, w, h);
index 636edc97b4bf181af212b5335aee91b56f526770..cc092dbf53803112765bb81b30142caecb830346 100644 (file)
@@ -49,7 +49,7 @@
 int board[3][3];   /*  amount of color for each square */
 
 /*  Clear color value for every square on the board   */
-void init(void)
+static void init(void)
 {
    int i, j;
    for (i = 0; i < 3; i++) 
@@ -64,7 +64,7 @@ void init(void)
  *  square is determined by its position on the grid, and 
  *  the value in the board[][] array.
  */
-void drawSquares(GLenum mode)
+static void drawSquares(GLenum mode)
 {
    GLuint i, j;
    for (i = 0; i < 3; i++) {
@@ -85,7 +85,7 @@ void drawSquares(GLenum mode)
 /*  processHits prints out the contents of the 
  *  selection array.
  */
-void processHits (GLint hits, GLuint buffer[])
+static void processHits (GLint hits, GLuint buffer[])
 {
    GLint i;
    GLuint j, ii = 0, jj = 0, names, *ptr;
@@ -117,7 +117,7 @@ void processHits (GLint hits, GLuint buffer[])
  */
 #define BUFSIZE 512
 
-void pickSquares(int button, int state, int x, int y)
+static void pickSquares(int button, int state, int x, int y)
 {
    GLuint selectBuf[BUFSIZE];
    GLint hits;
@@ -152,14 +152,14 @@ void pickSquares(int button, int state, int x, int y)
    glutPostRedisplay();
 } 
 
-void display(void)
+static void display(void)
 {
    glClear(GL_COLOR_BUFFER_BIT);
    drawSquares (GL_RENDER);
    glFlush();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, w, h);
    glMatrixMode(GL_PROJECTION);
@@ -170,7 +170,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index dc17f7b2386710a6fa7bdd9d319bf1783d474638..2c2e2d24d937edfeb2176ccf07444b4af76df4df 100644 (file)
@@ -47,7 +47,7 @@
 
 /*  Initialize material property, light source, and lighting model.
  */
-void myinit(void)
+static void myinit(void)
 {
     GLfloat mat_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
 /*   mat_specular and mat_shininess are NOT default values     */
@@ -75,7 +75,7 @@ void myinit(void)
     glEnable(GL_DEPTH_TEST);
 }
 
-void drawPlane(void)
+static void drawPlane(void)
 {
     glBegin (GL_QUADS);
     glNormal3f (0.0, 0.0, 1.0);
@@ -104,7 +104,7 @@ void drawPlane(void)
     glEnd();
 }
 
-void display (void)
+static void display (void)
 {
     GLfloat infinite_light[] = { 1.0, 1.0, 1.0, 0.0 };
     GLfloat local_light[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -125,7 +125,7 @@ void display (void)
     glFlush ();
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport (0, 0, w, h);
     glMatrixMode (GL_PROJECTION);
index e13672d3f631cf6aa464651a7c4914e5df73bb0a..cc428b4e4275438e220ff0db59e366a14ee4929a 100644 (file)
 
 static int year = 0, day = 0;
 
-void init(void) 
+static void init(void) 
 {
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glShadeModel (GL_FLAT);
 }
 
-void display(void)
+static void display(void)
 {
    glClear (GL_COLOR_BUFFER_BIT);
    glColor3f (1.0, 1.0, 1.0);
@@ -68,7 +68,7 @@ void display(void)
    glutSwapBuffers();
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h); 
    glMatrixMode (GL_PROJECTION);
@@ -80,7 +80,7 @@ void reshape (int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard (unsigned char key, int x, int y)
+static void keyboard (unsigned char key, int x, int y)
 {
    switch (key) {
       case 'd':
index de34b2e7675b2d55cf769631a176fc679e7f1688..0e0ce86ec91c74a1c6df02bcde55904f05b48f9b 100644 (file)
@@ -60,7 +60,7 @@ GLboolean doubleBuffer;
 /*  display() draws two spheres, one with a gray, diffuse material,
  *  the other sphere with a magenta material with a specular highlight.
  */
-void display (void)
+static void display (void)
 {
     GLfloat gray[] = { 0.8, 0.8, 0.8, 1.0 };
     GLfloat black[] = { 0.0, 0.0, 0.0, 1.0 };
@@ -108,7 +108,7 @@ void display (void)
  *  create display list with sphere
  *  initialize lighting and depth buffer
  */
-void gfxinit (void)
+static void gfxinit (void)
 {
     GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
     GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -134,7 +134,7 @@ void gfxinit (void)
 }
 
 /*  call when window is resized  */
-void reshape(int width, int height)
+static void reshape(int width, int height)
 {
     glViewport (0, 0, width, height);
     glMatrixMode (GL_PROJECTION);
@@ -176,7 +176,7 @@ static void Benchmark( float xdiff, float ydiff )
 
 /*  call when mouse button is pressed  */
 /* ARGSUSED2 */
-void mouse(int button, int state, int x, int y) {
+static void mouse(int button, int state, int x, int y) {
     switch (button) {
        case GLUT_LEFT_BUTTON:
            switch (state) {
@@ -213,7 +213,7 @@ void mouse(int button, int state, int x, int y) {
 }
 
 /* ARGSUSED1 */
-void keyboard (unsigned char key, int x, int y)
+static void keyboard (unsigned char key, int x, int y)
 {
    switch (key) {
       case 't':
@@ -268,20 +268,7 @@ void keyboard (unsigned char key, int x, int y)
    fflush(stdout);
 }
 
-static void
-key(unsigned char k, int x, int y)
-{
-  switch (k) {
-  case 27:  /* Escape */
-    exit(0);
-    break;
-  default:
-    return;
-  }
-  glutPostRedisplay();
-}
-
-GLenum Args(int argc, char **argv)
+static GLenum Args(int argc, char **argv)
 {
     GLint i;
 
index 409abd1753181b6989d9bfa37b527cd486536517..eeffe2301ce4c0639dc9a740cc128150e85ec571 100644 (file)
@@ -44,7 +44,7 @@
 #include <stdlib.h>
 #include <GL/glut.h>
 
-void display(void)
+static void display(void)
 {
     GLubyte fly[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
 0x03, 0x80, 0x01, 0xC0, 0x06, 0xC0, 0x03, 0x60, 0x04, 0x60, 0x06, 0x20,
@@ -89,7 +89,7 @@ void display(void)
     glFlush ();
 }
 
-void myinit (void)
+static void myinit (void)
 {
 /*  clear background to black  */
     glClearColor (0.0, 0.0, 0.0, 0.0);
index 7e99098304ac91a823c83c48fd74e0d1576088f4..1cbd395e47be5959f766100a42d00e1fb695f8c1 100644 (file)
@@ -54,7 +54,7 @@
 
 GLuint startList;
 
-void CALLBACK errorCallback(GLenum errorCode)
+static void CALLBACK errorCallback(GLenum errorCode)
 {
    const GLubyte *estring;
 
@@ -63,7 +63,7 @@ void CALLBACK errorCallback(GLenum errorCode)
    exit(0);
 }
 
-void init(void) 
+static void init(void) 
 {
    GLUquadricObj *qobj;
    GLfloat mat_ambient[] = { 0.5, 0.5, 0.5, 1.0 };
@@ -120,7 +120,7 @@ void init(void)
    gluDeleteQuadric(qobj);
 }
 
-void display(void)
+static void display(void)
 {
    glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glPushMatrix();
@@ -150,7 +150,7 @@ void display(void)
    glFlush();
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -166,7 +166,7 @@ void reshape (int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index 94e20ac71eb08b9bf96f9a50d3f3019654984c22..c90b72ab3ea3605362fd529c4819a2988ec510e8 100644 (file)
 
 static int shoulder = 0, elbow = 0;
 
-void init(void) 
+static void init(void) 
 {
   glClearColor (0.0, 0.0, 0.0, 0.0);
   glShadeModel (GL_FLAT);
 }
 
-void display(void)
+static void display(void)
 {
    glClear (GL_COLOR_BUFFER_BIT);
    glPushMatrix();
@@ -77,7 +77,7 @@ void display(void)
    glutSwapBuffers();
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h); 
    glMatrixMode (GL_PROJECTION);
@@ -89,7 +89,7 @@ void reshape (int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard (unsigned char key, int x, int y)
+static void keyboard (unsigned char key, int x, int y)
 {
    switch (key) {
       case 's':
index 0ea750e5846f2febfa74dbeac7472fcf2ca66725..d9e0a254e908eff9239136f244ddc1be56bba159 100644 (file)
@@ -49,7 +49,7 @@
 
 /*  Initialize material property and light source.
  */
-void myinit(void)
+static void myinit(void)
 {
     GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
     GLfloat light_diffuse[] = { 1.0, 0.0, 1.0, 1.0 };
@@ -68,7 +68,7 @@ void myinit(void)
     glEnable(GL_DEPTH_TEST);
 }
 
-void display(void)
+static void display(void)
 {
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     glPushMatrix ();
@@ -95,7 +95,7 @@ void display(void)
     glFlush();
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
     glMatrixMode(GL_PROJECTION);
index c3abc727b783bcbcca14d25d626bf2d23372fe7b..6f336a8db4662c8f464a09f16dcabebaab0cb361 100644 (file)
@@ -48,7 +48,7 @@
 
 /*  Initialize material property and light source.
  */
-void myinit (void)
+static void myinit (void)
 {
     GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
     GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -67,7 +67,7 @@ void myinit (void)
     glEnable(GL_DEPTH_TEST);
 }
 
-void display (void)
+static void display (void)
 {
     glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
@@ -95,7 +95,7 @@ void display (void)
     glFlush ();
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport (0, 0, w, h);
     glMatrixMode (GL_PROJECTION);
index e7264d2003fcb9988d63bd89199ab266841728b7..ea605f8c73768cd5bd1c310ff8163960f32cb411 100644 (file)
@@ -47,7 +47,7 @@
 
 /*  Initialize light source and lighting.
  */
-void myinit(void)
+static void myinit(void)
 {
     GLfloat light_ambient[] = { 0.0, 0.0, 1.0, 1.0 };
     GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -66,7 +66,7 @@ void myinit(void)
     glEnable(GL_DEPTH_TEST);
 }
 
-void display(void)
+static void display(void)
 {
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
@@ -94,7 +94,7 @@ void display(void)
     glFlush();
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
     glMatrixMode(GL_PROJECTION);
index 10891fb99777be8c9d8d5a5873552635c02a41e2..1b277334f5c98e504453aa9f28a4e2f05bc43fa9 100644 (file)
@@ -46,7 +46,7 @@
 
 /*  Initialize light source and shading model (GL_FLAT).
  */
-void myinit(void)
+static void myinit(void)
 {
     GLfloat light_ambient[] = { 0.0, 0.0, 0.0, 1.0 };
     GLfloat light_diffuse[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -66,7 +66,7 @@ void myinit(void)
     glShadeModel (GL_FLAT);
 }
 
-void display(void)
+static void display(void)
 {
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
@@ -94,7 +94,7 @@ void display(void)
     glFlush();
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
     glMatrixMode(GL_PROJECTION);
index 928373b8796cbfaac5bda95fe4cc5b6d91415dbe..537d5194d46ae20704b42bb8f07e98a63ac27311 100644 (file)
@@ -57,7 +57,7 @@
 /* draw a triangle with vertices at (x1, y1), (x2, y2) 
  * and (x3, y3) at z units away from the origin.
  */
-void drawTriangle (GLfloat x1, GLfloat y1, GLfloat x2, 
+static void drawTriangle (GLfloat x1, GLfloat y1, GLfloat x2, 
     GLfloat y2, GLfloat x3, GLfloat y3, GLfloat z)
 {
    glBegin (GL_TRIANGLES);
@@ -68,8 +68,8 @@ void drawTriangle (GLfloat x1, GLfloat y1, GLfloat x2,
 }
 
 /* draw a rectangular box with these outer x, y, and z values */
-void drawViewVolume (GLfloat x1, GLfloat x2, GLfloat y1, 
-                     GLfloat y2, GLfloat z1, GLfloat z2)
+static void drawViewVolume (GLfloat x1, GLfloat x2, GLfloat y1, 
+                            GLfloat y2, GLfloat z1, GLfloat z2)
 {
    glColor3f (1.0, 1.0, 1.0);
    glBegin (GL_LINE_LOOP);
@@ -101,7 +101,7 @@ void drawViewVolume (GLfloat x1, GLfloat x2, GLfloat y1,
 /* drawScene draws 4 triangles and a wire frame
  * which represents the viewing volume.
  */
-void drawScene (void)
+static void drawScene (void)
 {
    glMatrixMode (GL_PROJECTION);
    glLoadIdentity ();
@@ -122,7 +122,7 @@ void drawScene (void)
 
 /* processHits prints out the contents of the selection array
  */
-void processHits (GLint hits, GLuint buffer[])
+static void processHits (GLint hits, GLuint buffer[])
 {
    GLint i;
    GLuint j, names, *ptr;
@@ -150,7 +150,7 @@ void processHits (GLint hits, GLuint buffer[])
  */
 #define BUFSIZE 512
 
-void selectObjects(void)
+static void selectObjects(void)
 {
    GLuint selectBuf[BUFSIZE];
    GLint hits;
@@ -181,13 +181,13 @@ void selectObjects(void)
    processHits (hits, selectBuf);
 } 
 
-void init (void) 
+static void init (void) 
 {
    glEnable(GL_DEPTH_TEST);
    glShadeModel(GL_FLAT);
 }
 
-void display(void)
+static void display(void)
 {
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -197,7 +197,7 @@ void display(void)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index 9d22fc90251bb68d78cf81ea59f1e5f10cf52e27..874033d5adf0f22e543e87b9e34eb633677febe9 100644 (file)
 #include <GL/glut.h>
 #include <stdlib.h>
 
-void init(void) 
+static void init(void) 
 {
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glShadeModel (GL_SMOOTH);
 }
 
-void triangle(void)
+static void triangle(void)
 {
    glBegin (GL_TRIANGLES);
    glColor3f (1.0, 0.0, 0.0);
@@ -61,14 +61,14 @@ void triangle(void)
    glEnd();
 }
 
-void display(void)
+static void display(void)
 {
    glClear (GL_COLOR_BUFFER_BIT);
    triangle ();
    glFlush ();
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode (GL_PROJECTION);
@@ -81,7 +81,7 @@ void reshape (int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index b33e40a03072be00d3139aed63766c9ac320060b..5325abf8b773f9fbc893f9ef6b737e4e0b2647a6 100644 (file)
@@ -64,7 +64,7 @@
 #define YELLOWMAT   1
 #define BLUEMAT 2
 
-void myinit (void)
+static void myinit (void)
 {
     GLfloat yellow_diffuse[] = { 0.7, 0.7, 0.0, 1.0 };
     GLfloat yellow_specular[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -101,7 +101,7 @@ void myinit (void)
 /*  Draw a sphere in a diamond-shaped section in the
  *  middle of a window with 2 tori.
  */
-void display(void)
+static void display(void)
 {
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
@@ -132,7 +132,7 @@ void display(void)
 /*  Whenever the window is reshaped, redefine the
  *  coordinate system and redraw the stencil area.
  */
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
 
index 19b0391cbae79fbb257ae923560a4fd2731e415e..68b639abf4fc5e246cb4e102e7823eca8a57c20c 100644 (file)
@@ -87,7 +87,7 @@ CP Sdata[] = {
 /*  drawLetter() interprets the instructions from the array
  *  for that letter and renders the letter with line segments.
  */
-void drawLetter(CP *l)
+static void drawLetter(CP *l)
 {
     glBegin(GL_LINE_STRIP);
     for (;;) {
@@ -111,7 +111,7 @@ void drawLetter(CP *l)
 }
 
 /*  Create a display list for each of 6 characters     */
-void myinit (void)
+static void myinit (void)
 {
     GLuint base;
 
@@ -130,13 +130,13 @@ void myinit (void)
 char *test1 = "A SPARE SERAPE APPEARS AS";
 char *test2 = "APES PREPARE RARE PEPPERS";
 
-void printStrokedString(char *s)
+static void printStrokedString(char *s)
 {
     GLsizei len = (GLsizei) strlen(s);
     glCallLists(len, GL_BYTE, (GLbyte *)s);
 }
 
-void display(void)
+static void display(void)
 {
     glClear(GL_COLOR_BUFFER_BIT);
     glColor3f(1.0, 1.0, 1.0);
index e33ce14f4fc4f1309885116f151560d351c8f8f6..f0c5ab0b47c4080938a018e2500cda2450dce546 100644 (file)
@@ -53,7 +53,7 @@ GLUnurbsObj *theNurb;
  *  Initializes the control points of the surface to a small hill.
  *  The control points range from -3 to +3 in x, y, and z
  */
-void init_surface(void)
+static void init_surface(void)
 {
     int u, v;
     for (u = 0; u < 4; u++) {
@@ -71,7 +71,7 @@ void init_surface(void)
 
 /*  Initialize material property and depth buffer.
  */
-void myinit(void)
+static void myinit(void)
 {
     GLfloat mat_diffuse[] = { 0.7, 0.7, 0.7, 1.0 };
     GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -100,7 +100,7 @@ void myinit(void)
     glTranslatef (0.0, 0.0, -5.0);
 }
 
-void display(void)
+static void display(void)
 {
     GLfloat knots[8] = {0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0};
     int i, j;
@@ -140,7 +140,7 @@ void display(void)
     glutSwapBuffers();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
     glViewport(0, 0, w, h);
     glMatrixMode(GL_PROJECTION);
@@ -150,7 +150,7 @@ void reshape(int w, int h)
     glMatrixMode(GL_MODELVIEW);
 }
 
-void
+static void
 menu(int value)
 {
     switch (value) {
@@ -171,7 +171,7 @@ menu(int value)
 int down = 0, lastx;
 
 /* ARGSUSED1 */
-void
+static void
 motion(int x, int y)
 {
     if (down) {
@@ -182,7 +182,7 @@ motion(int x, int y)
 }
 
 /* ARGSUSED3 */
-void
+static void
 mouse(int button, int state, int x, int y)
 {
     if (button == GLUT_LEFT_BUTTON) {
index 53b5111752fa12b6c38fcde3d822db7be821b24b..20ff1a4a33bcdbdd9b20decf4179d1ad89ae1418 100644 (file)
@@ -47,7 +47,7 @@
 
 /*  Initialize light source and lighting model.
  */
-void
+static void
 myinit(void)
 {
     GLfloat light_ambient[] =
@@ -78,7 +78,7 @@ myinit(void)
     glEnable(GL_DEPTH_TEST);
 }
 
-void
+static void
 display(void)
 {
     GLfloat low_ambient[] =
@@ -114,7 +114,7 @@ display(void)
     glFlush();
 }
 
-void
+static void
 myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
index fb7aed380ebc74ca34ef7b5edd359790c4d0a5cc..102c18a3e33fc664db1e83f609ab1d5fd5e9326e 100644 (file)
@@ -49,7 +49,7 @@
  * Initialize depth buffer, projection matrix, light source, and lighting
  * model.  Do not specify a material property here.
  */
-void
+static void
 myinit(void)
 {
   GLfloat ambient[] =
@@ -83,7 +83,7 @@ myinit(void)
  * Move object into position.  Use 3rd through 12th parameters to specify the
  * material property.  Draw a teapot.
  */
-void
+static void
 renderTeapot(GLfloat x, GLfloat y,
   GLfloat ambr, GLfloat ambg, GLfloat ambb,
   GLfloat difr, GLfloat difg, GLfloat difb,
@@ -117,7 +117,7 @@ renderTeapot(GLfloat x, GLfloat y,
  *  3rd column:  black, cyan, green, red, white, yellow plastic
  *  4th column:  black, cyan, green, red, white, yellow rubber
  */
-void
+static void
 display(void)
 {
   glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
@@ -173,7 +173,7 @@ display(void)
   glFlush();
 }
 
-void
+static void
 myReshape(int w, int h)
 {
   glViewport(0, 0, w, h);
index 238a469aff20d759a31eb274fe0b9a79e3f70e28..0bf8a8eb9867d31fc512e6b789d382d6e92601db 100644 (file)
@@ -61,7 +61,7 @@
 
 GLuint startList;
 
-void display (void) {
+static void display (void) {
    glClear(GL_COLOR_BUFFER_BIT);
    glColor3f(1.0, 1.0, 1.0);
    glCallList(startList);
@@ -69,12 +69,12 @@ void display (void) {
    glFlush();
 }
 
-void CALLBACK beginCallback(GLenum which)
+static void CALLBACK beginCallback(GLenum which)
 {
    glBegin(which);
 }
 
-void CALLBACK errorCallback(GLenum errorCode)
+static void CALLBACK errorCallback(GLenum errorCode)
 {
    const GLubyte *estring;
 
@@ -83,12 +83,12 @@ void CALLBACK errorCallback(GLenum errorCode)
    exit(0);
 }
 
-void CALLBACK endCallback(void)
+static void CALLBACK endCallback(void)
 {
    glEnd();
 }
 
-void CALLBACK vertexCallback(GLvoid *vertex)
+static void CALLBACK vertexCallback(GLvoid *vertex)
 {
    const GLdouble *pointer;
 
@@ -102,7 +102,7 @@ void CALLBACK vertexCallback(GLvoid *vertex)
  *  but weight[4] may be used to average color, normal, or texture
  *  coordinate data.  In this program, color is weighted.
  */
-void CALLBACK combineCallback(GLdouble coords[3],
+static void CALLBACK combineCallback(GLdouble coords[3],
                      GLdouble *vertex_data[4],
                      GLfloat weight[4], GLdouble **dataOut )
 {
@@ -122,7 +122,7 @@ void CALLBACK combineCallback(GLdouble coords[3],
    *dataOut = vertex;
 }
 
-void init (void)
+static void init (void)
 {
    GLUtesselator *tobj;
    GLdouble rect[4][3] = {{50.0, 50.0, 0.0},
@@ -199,7 +199,7 @@ void init (void)
    gluDeleteTess(tobj);
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -208,7 +208,7 @@ void reshape (int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index 7d00c9f907d432c8b68370a1ff61df02105405c5..4729880a57e5ee91a8eaa784b11049cfdc8ca394 100644 (file)
@@ -61,7 +61,7 @@ GLuint list;
 /*  Make four display lists, 
  *  each with a different tessellated object. 
  */
-void makeNewLists (void) {
+static void makeNewLists (void) {
    int i;
    static GLdouble rects[12][3] = 
       {{ 50.0,  50.0, 0.0}, {300.0,  50.0, 0.0}, 
@@ -153,7 +153,7 @@ void makeNewLists (void) {
    glEndList();
 }
 
-void display (void) {
+static void display (void) {
    glClear(GL_COLOR_BUFFER_BIT);
    glColor3f(1.0, 1.0, 1.0);
    glPushMatrix(); 
@@ -168,12 +168,12 @@ void display (void) {
    glFlush();
 }
 
-void CALLBACK beginCallback(GLenum which)
+static void CALLBACK beginCallback(GLenum which)
 {
    glBegin(which);
 }
 
-void CALLBACK errorCallback(GLenum errorCode)
+static void CALLBACK errorCallback(GLenum errorCode)
 {
    const GLubyte *estring;
 
@@ -182,7 +182,7 @@ void CALLBACK errorCallback(GLenum errorCode)
    exit(0);
 }
 
-void CALLBACK endCallback(void)
+static void CALLBACK endCallback(void)
 {
    glEnd();
 }
@@ -193,7 +193,7 @@ void CALLBACK endCallback(void)
  *  coordinate data.
  */
 /* ARGSUSED */
-void CALLBACK combineCallback(GLdouble coords[3], GLdouble *data[4],
+static void CALLBACK combineCallback(GLdouble coords[3], GLdouble *data[4],
                      GLfloat weight[4], GLdouble **dataOut )
 {
    GLdouble *vertex;
@@ -205,7 +205,7 @@ void CALLBACK combineCallback(GLdouble coords[3], GLdouble *data[4],
    *dataOut = vertex;
 }
 
-void init(void) 
+static void init(void) 
 {
    glClearColor(0.0, 0.0, 0.0, 0.0);
    glShadeModel(GL_FLAT);    
@@ -226,7 +226,7 @@ void init(void)
    makeNewLists();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -240,7 +240,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 'w':
index 6a828ab2bdf2af803538b46aa70aef48d7319926..b6404b32d8cfdd57ce20ee57ecd4fb4bbf689f3a 100644 (file)
@@ -52,7 +52,7 @@ static GLubyte otherImage[checkImageHeight][checkImageWidth][4];
 
 static GLuint texName[2];
 
-void makeCheckImages(void)
+static void makeCheckImages(void)
 {
    int i, j, c;
 
@@ -72,7 +72,7 @@ void makeCheckImages(void)
    }
 }
 
-void init(void)
+static void init(void)
 {
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glShadeModel(GL_FLAT);
@@ -105,7 +105,7 @@ void init(void)
    glEnable(GL_TEXTURE_2D);
 }
 
-void display(void)
+static void display(void)
 {
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glBindTexture(GL_TEXTURE_2D, texName[0]);
@@ -125,7 +125,7 @@ void display(void)
    glFlush();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -137,7 +137,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index 7c1802a3be9455bfaed29af9eefabc495f891dad..5cb97e5a43d2b20ab42eaff1ee87dc09c733dfff 100644 (file)
@@ -60,7 +60,7 @@ GLubyte stripeImage[4*stripeImageWidth];
 static GLuint texName;
 #endif
 
-void makeStripeImage(void)
+static void makeStripeImage(void)
 {
    int j;
     
@@ -79,7 +79,7 @@ static GLfloat *currentCoeff;
 static GLenum currentPlane;
 static GLint currentGenMode;
 
-void init(void)
+static void init(void)
 {
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glEnable(GL_DEPTH_TEST);
@@ -122,7 +122,7 @@ void init(void)
    glMaterialf (GL_FRONT, GL_SHININESS, 64.0);
 }
 
-void display(void)
+static void display(void)
 {
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
 
@@ -136,7 +136,7 @@ void display(void)
    glFlush();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -152,7 +152,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard (unsigned char key, int x, int y)
+static void keyboard (unsigned char key, int x, int y)
 {
    switch (key) {
       case 'e':
index 6f1e853facdf334dd966a27609b075a2e693e89f..c2d699a71b2278210b4a266de99652e03623fa66 100644 (file)
@@ -53,7 +53,7 @@
 #define GL_TEXTURE_INTERNAL_FORMAT GL_TEXTURE_COMPONENTS
 #endif
 
-void init(void) 
+static void init(void) 
 {
    GLint proxyComponents;
 
@@ -84,12 +84,12 @@ void init(void)
    putchar('\n');
 }
 
-void display(void)
+static void display(void)
 {
    exit(0);
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h); 
    glMatrixMode (GL_PROJECTION);
index 4e829675aba84cbef312f760e44c91385e0fbd36..7827d5a45f37bcbd9ad2048339b82b70867c9f84 100644 (file)
@@ -58,7 +58,7 @@ static GLubyte subImage[subImageHeight][subImageWidth][4];
 
 static GLuint texName;
 
-void makeCheckImages(void)
+static void makeCheckImages(void)
 {
    int i, j, c;
 
@@ -82,7 +82,7 @@ void makeCheckImages(void)
    }
 }
 
-void init(void)
+static void init(void)
 {
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glShadeModel(GL_FLAT);
@@ -102,7 +102,7 @@ void init(void)
                 0, GL_RGBA, GL_UNSIGNED_BYTE, checkImage);
 }
 
-void display(void)
+static void display(void)
 {
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glEnable(GL_TEXTURE_2D);
@@ -123,7 +123,7 @@ void display(void)
    glDisable(GL_TEXTURE_2D);
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -135,7 +135,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard (unsigned char key, int x, int y)
+static void keyboard (unsigned char key, int x, int y)
 {
    switch (key) {
       case 's':
index 0170070eaa5eb109531aea94ed580c7a8a9ca57e..2023072dba8422761a38e57ade928f4b26d9fddf 100644 (file)
@@ -60,7 +60,7 @@ GLfloat ctrlpoints[4][4][3] = {
 GLfloat texpts[2][2][2] = {{{0.0, 0.0}, {0.0, 1.0}},
                        {{1.0, 0.0}, {1.0, 1.0}}};
 
-void display(void)
+static void display(void)
 {
     glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
     glColor3f(1.0, 1.0, 1.0);
@@ -72,7 +72,7 @@ void display(void)
 #define        imageHeight 64
 GLubyte image[3*imageWidth*imageHeight];
 
-void makeImage(void)
+static void makeImage(void)
 {
     int i, j;
     float ti, tj;
@@ -89,7 +89,7 @@ void makeImage(void)
     }
 }
 
-void myinit(void)
+static void myinit(void)
 {
     glMap2f(GL_MAP2_VERTEX_3, 0, 1, 3, 4,
            0, 1, 12, 4, &ctrlpoints[0][0][0]);
@@ -112,7 +112,7 @@ void myinit(void)
     glShadeModel (GL_FLAT);
 }
 
-void myReshape(int w, int h)
+static void myReshape(int w, int h)
 {
     glViewport(0, 0, w, h);
     glMatrixMode(GL_PROJECTION);
index 7ae4d41e263ba7a691edac77110a4347730a4fc4..a67d48e0f594b251d64aaa480ddc4bf4147a3d9a 100644 (file)
@@ -89,7 +89,7 @@ static void init(void)
 }
 
 /* Clear window and draw torus */
-void display(void)
+static void display(void)
 {
    glClear(GL_COLOR_BUFFER_BIT);
    glColor3f (1.0, 1.0, 1.0);
@@ -98,7 +98,7 @@ void display(void)
 }
 
 /* Handle window resize */
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -112,7 +112,7 @@ void reshape(int w, int h)
 /* Rotate about x-axis when "x" typed; rotate about y-axis
    when "y" typed; "i" returns torus to original view */
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
    case 'x':
index f17674f68409534e04cbd1c093318be9b87ad24d..216f62a7c2fb7d68d5a90c7e7e242e3349cbfe95 100644 (file)
@@ -59,7 +59,7 @@ GLUnurbsObj *theNurb;
  *  Initializes the control points of the surface to a small hill.
  *  The control points range from -3 to +3 in x, y, and z
  */
-void init_surface(void)
+static void init_surface(void)
 {
    int u, v;
    for (u = 0; u < 4; u++) {
@@ -75,7 +75,7 @@ void init_surface(void)
    }
 }
 
-void nurbsError(GLenum errorCode)
+static void nurbsError(GLenum errorCode)
 {
    const GLubyte *estring;
 
@@ -86,7 +86,7 @@ void nurbsError(GLenum errorCode)
                        
 /*  Initialize material property and depth buffer.
  */
-void init(void)
+static void init(void)
 {
    GLfloat mat_diffuse[] = { 0.7, 0.7, 0.7, 1.0 };
    GLfloat mat_specular[] = { 1.0, 1.0, 1.0, 1.0 };
@@ -112,7 +112,7 @@ void init(void)
                     (GLvoid (CALLBACK*) ()) nurbsError);
 }
 
-void display(void)
+static void display(void)
 {
    GLfloat knots[8] = {0.0, 0.0, 0.0, 0.0, 1.0, 1.0, 1.0, 1.0};
    GLfloat edgePt[5][2] = /* counter clockwise */
@@ -147,7 +147,7 @@ void display(void)
    glFlush();
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -160,7 +160,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index 134c361bac550957cff7f9a00079aa02e8fb47ae..6d1c7dbededf8547a985530a5f43d36db52d17f5 100644 (file)
 #include <stdlib.h>
 #include <stdio.h>
 
-void display(void)
+static void display(void)
 {
    glClear(GL_COLOR_BUFFER_BIT);
    glFlush();
 }
 
 /* Change these values for a different transformation  */
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -62,7 +62,7 @@ void reshape(int w, int h)
    glLoadIdentity();
 }
 
-void mouse(int button, int state, int x, int y) 
+static void mouse(int button, int state, int x, int y) 
 {
    GLint viewport[4];
    GLdouble mvmatrix[16], projmatrix[16];
@@ -98,7 +98,7 @@ void mouse(int button, int state, int x, int y)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index b22e723e0ec66dc8e7dbb9fd3a1422c0a8f21898..8ce39d776330e1e213c9d30bd830d05a6bbf7cd6 100644 (file)
@@ -54,7 +54,7 @@
 int setupMethod = POINTER;
 int derefMethod = DRAWARRAY;
 
-void setupPointers(void)
+static void setupPointers(void)
 {
    static GLint vertices[] = {25, 25,
                        100, 325,
@@ -76,7 +76,7 @@ void setupPointers(void)
    glColorPointer (3, GL_FLOAT, 0, colors);
 }
 
-void setupInterleave(void)
+static void setupInterleave(void)
 {
    static GLfloat intertwined[] =
       {1.0, 0.2, 1.0, 100.0, 100.0, 0.0,
@@ -89,14 +89,14 @@ void setupInterleave(void)
    glInterleavedArrays (GL_C3F_V3F, 0, intertwined);
 }
 
-void init(void) 
+static void init(void) 
 {
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glShadeModel (GL_SMOOTH);
    setupPointers ();
 }
 
-void display(void)
+static void display(void)
 {
    glClear (GL_COLOR_BUFFER_BIT);
 
@@ -117,7 +117,7 @@ void display(void)
    glFlush ();
 }
 
-void reshape (int w, int h)
+static void reshape (int w, int h)
 {
    glViewport (0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode (GL_PROJECTION);
@@ -126,7 +126,7 @@ void reshape (int w, int h)
 }
 
 /* ARGSUSED2 */
-void mouse (int button, int state, int x, int y)
+static void mouse (int button, int state, int x, int y)
 {
    switch (button) {
       case GLUT_LEFT_BUTTON:
@@ -160,7 +160,7 @@ void mouse (int button, int state, int x, int y)
 }
 
 /* ARGSUSED1 */
-void keyboard(unsigned char key, int x, int y)
+static void keyboard(unsigned char key, int x, int y)
 {
    switch (key) {
       case 27:
index f9a1f162ab6a8fa2ba6a619fab131b13252422c1..67749716e836d39611c0e788e1de5e3bad21450f 100644 (file)
@@ -59,7 +59,7 @@ static GLubyte checkImage[checkImageHeight][checkImageWidth][4];
 static GLuint texName;
 #endif
 
-void makeCheckImage(void)
+static void makeCheckImage(void)
 {
    int i, j, c;
     
@@ -74,7 +74,7 @@ void makeCheckImage(void)
    }
 }
 
-void init(void)
+static void init(void)
 {    
    glClearColor (0.0, 0.0, 0.0, 0.0);
    glShadeModel(GL_FLAT);
@@ -101,7 +101,7 @@ void init(void)
 #endif
 }
 
-void display(void)
+static void display(void)
 {
    glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
    glEnable(GL_TEXTURE_2D);
@@ -125,7 +125,7 @@ void display(void)
    glDisable(GL_TEXTURE_2D);
 }
 
-void reshape(int w, int h)
+static void reshape(int w, int h)
 {
    glViewport(0, 0, (GLsizei) w, (GLsizei) h);
    glMatrixMode(GL_PROJECTION);
@@ -137,7 +137,7 @@ void reshape(int w, int h)
 }
 
 /* ARGSUSED1 */
-void keyboard (unsigned char key, int x, int y)
+static void keyboard (unsigned char key, int x, int y)
 {
    switch (key) {
       case 's':
index 10e5eba7c5e0eace8764ae987d90d7752ca192bb..b070011bd2ea452b6fdb18a46659b78c529a9d15 100644 (file)
@@ -73,7 +73,7 @@ static void Init(void)
                        0,
                        sourceFormat,
                        GL_UNSIGNED_BYTE,
-                       //GL_UNSIGNED_INT,
+                       /* GL_UNSIGNED_INT, */
                        tex2d);
 
                glEnable(Target);
index bd8e05aee134a0c65457de45848f671c0613213a..2988e20920026078c1240c072ad5ecc9e67546fa 100644 (file)
@@ -174,7 +174,7 @@ static void Init( void )
       exit(1);
    }
 
-   printf("\nAll %u squares should be the same color.\n", NUM_TESTS + 1);
+   printf("\nAll %lu squares should be the same color.\n", (unsigned long) NUM_TESTS + 1);
    
    (void) memset( temp, 0x00, sizeof( temp ) );
    glBindTexture( GL_TEXTURE_2D, 1 );
index 2b8f8d0f5ec30529025039fdc491a5a2a073502f..1f30d5733e7051d8fefb269e0c8c0634e11e5da0 100644 (file)
@@ -57,6 +57,7 @@ static void Key( unsigned char key, int x, int y )
 
 static void Init( void )
 {
+#if 0
    static const char *prog0 =
       "!!FP1.0\n"
       "MUL   o[COLR], R0, f[WPOS]; \n"
@@ -73,6 +74,7 @@ static void Init( void )
       "MOV   HC, H2; \n"
       "END \n"
       ;
+#endif
 
    /* masked updates, defines, declarations */
    static const char *prog1 =
index 3bc97a460b66c7cc052282825ada48390197366c..45001b44d0798b0275858ac5c1ce5abf2451089b 100644 (file)
@@ -165,7 +165,7 @@ static void Init( void )
          "square should look upside-down.\n");
    
 
-   image = LoadRGBImage( IMAGE_FILE, & img_width, & img_height,
+   image = LoadRGBImage( IMAGE_FILE, (GLint *) & img_width, (GLint *) & img_height,
                         & img_format );
    if ( image == NULL ) {
       printf( "Could not open image file \"%s\".\n", IMAGE_FILE );
index c8884bb79f1da48897eb6314fd9f43a99f689f4e..1e70a31151a60118970b4e2efe94c2f1096876ed 100644 (file)
@@ -274,6 +274,7 @@ Draw(void)
    glRasterPos2i(8, 6);
    sprintf(s, "Internal Texture Format [f/F]: %s (%d of %lu)",
            IntFormats[CurFormat].name, CurFormat + 1, NUM_INT_FORMATS);
+           IntFormats[CurFormat].name, CurFormat + 1, (unsigned long) NUM_INT_FORMATS);
    PrintString(s);
    glPopMatrix();
 
index 2098b51ccd21f3e2923047af2cb1b9117e5c6576..e5b9920b66d5f2a5e20b2957f31fac475c10ca48 100644 (file)
@@ -17,7 +17,10 @@ static GLfloat Xrot = 40, Yrot = 0, Zrot = 0;
 static GLboolean Anim = GL_TRUE;
 static GLuint Vbuffer = 0;
 
+#if 1
+#else
 static GLfloat buf[NUM_QUADS * 6 * 4];
+#endif
 
 static GLboolean doSwapBuffers = GL_TRUE;
 
index 582e65fb72b5d343a8788a98d35e965e79f273cf..4ef307b424e9814a505339af46bba87d335a503a 100644 (file)
@@ -104,7 +104,7 @@ static void draw(void)
 
    glDisable(GL_SCISSOR_TEST);
 
-   //glutSwapBuffers();
+   /* glutSwapBuffers(); */
    glFlush();
 }
 
@@ -120,7 +120,7 @@ int main(int argc, char **argv)
    glutInitWindowPosition(100, 0);
    glutInitWindowSize(prog.width, prog.height);
 
-   //type = GLUT_RGB | GLUT_DOUBLE;
+   /* type = GLUT_RGB | GLUT_DOUBLE; */
    type = GLUT_RGB | GLUT_SINGLE;
    glutInitDisplayMode(type);
 
index 2dfd2174e8210e1b99c3ff03e4bb80b471d90259..e5a68ffabd36b672f915497a40c3ad6a99050c78 100644 (file)
@@ -134,7 +134,7 @@ static void draw(void)
 
    glDisable(GL_SCISSOR_TEST);
 
-   //glutSwapBuffers();
+   /* glutSwapBuffers(); */
    glFlush();
 }
 
@@ -150,7 +150,7 @@ int main(int argc, char **argv)
    glutInitWindowPosition(100, 0);
    glutInitWindowSize(prog.width, prog.height);
 
-   //type = GLUT_RGB | GLUT_DOUBLE;
+   /* type = GLUT_RGB | GLUT_DOUBLE; */
    type = GLUT_RGB | GLUT_SINGLE;
    glutInitDisplayMode(type);
 
index 2e219fd8b503dace5fb74c870a756b943ccf64a4..d396fc2a5333b379a3b73ec207e0743e11d16f9d 100644 (file)
@@ -257,7 +257,7 @@ static void Init( void )
     * part of GL 1.4.
     */
 
-   ver_str = glGetString( GL_VERSION );
+   ver_str = (char *) glGetString( GL_VERSION );
    version = (ver_str == NULL) ? 1.0 : atof( ver_str );
 
    wrapping = (glutExtensionSupported("GL_EXT_stencil_wrap") || (version >= 1.4));
index 4abe1068c7b9c20372f49e2654b50b9c300c7676..7d67451c0da5153d6a337c175d9cc663869ab054 100644 (file)
@@ -39,11 +39,13 @@ static void draw( void )
 
 
 
+/*
 static void idle( void )
 {
    Angle += 2.0;
    glutPostRedisplay();
 }
+*/
 
 
 
index db6fffa3e8953f6701a8f4303826f7df3deea1f8..331cbf2f6b1611d4b50ffcd8b6b48767e50ef804 100644 (file)
@@ -31,6 +31,7 @@
 
 static int win_width, win_height;
 
+#if 0
 static void
 line(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
 {
@@ -39,6 +40,7 @@ line(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
        glVertex2f(x2, y2);
        glEnd();
 }
+#endif
 
 static void
 line3(GLfloat x1, GLfloat y1, GLfloat z1, GLfloat x2, GLfloat y2, GLfloat z2)
index 238f634bf59242484002c5bb3040d715d8cd5956..ff31706fd1cc9d6bca4c2269bb6d58111b1fcec9 100644 (file)
@@ -102,8 +102,8 @@ static void Draw( void )
 
    /* draw to texture image */
    glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB);
-//   glDrawBuffer(GL_COLOR_ATTACHMENT1_EXT);
-//   glReadBuffer(GL_COLOR_ATTACHMENT1_EXT);
+   /* glDrawBuffer(GL_COLOR_ATTACHMENT1_EXT); */
+   /* glReadBuffer(GL_COLOR_ATTACHMENT1_EXT); */
 
    
    glViewport(0, 0, TexWidth, TexHeight);
index 04a088642b89387d45ceeb2734553995da8ecdec..93da30ee29439f0460a545141100d6d429abe7a2 100644 (file)
@@ -116,6 +116,6 @@ int main(int argc, char **argv)
     glutReshapeFunc(Reshape);
     glutKeyboardFunc(Key);
     glutDisplayFunc(Draw);
-//    glutMainLoop();
+    /* glutMainLoop(); */
        return 0;
 }
index da3864a02a436dfcef89914ee40406cb84413937..dbfaef3978ff5bb0fb41a59474a97918506bbb00 100644 (file)
@@ -49,7 +49,7 @@ static void Init(void)
     */
    first_list = glGenLists(1);
    glNewList(first_list, GL_COMPILE); 
-//   glColor3f(0,1,0);
+   /* glColor3f(0,1,0); */
    glEndList();
 
 
index 95a89981d3a859c1189a4f57ae02e9df7623220b..2345ae9e9edb89f7cd2b02e636f5c50ac45d810b 100644 (file)
@@ -66,7 +66,7 @@ static void Display( void )
 
    glEnable(GL_VERTEX_PROGRAM_ARB);
 
-//   glDrawArrays( GL_TRIANGLES, 0, 3 );
+   /* glDrawArrays( GL_TRIANGLES, 0, 3 ); */
    glDrawArrays( GL_TRIANGLES, 1, 3 );
 
    glFlush(); 
index 27d86682f75fa9584db30292b981de56cd80487e..f5c0a50f9a9faa19907c4c61e2ac62a1d8eebbe6 100644 (file)
@@ -77,7 +77,7 @@ static void Display( void )
 
    glEnable(GL_VERTEX_PROGRAM_ARB);
 
-//   glDrawArrays( GL_TRIANGLES, 0, 3 );
+   /* glDrawArrays( GL_TRIANGLES, 0, 3 ); */
    glDrawArrays( GL_TRIANGLES, 1, 3 );
 
    glFlush(); 
index 8f933befd3dd1e6c09827ffa2ef2d631bc3b40cd..6ecfef4d2ac5a803994e78cf4c4738dcf91da4ae 100644 (file)
@@ -42,7 +42,7 @@ static void Init(void)
    static const char *prog1 =
       "!!ARBfp1.0\n"
       "MOV  result.color, fragment.texcoord[1];\n"
-//      "MOV  result.color, fragment.color;\n"
+      /* "MOV  result.color, fragment.color;\n" */
       "END\n";
 
 
index 53c2614ac32bf9ef53892e7256375e80491c0140..2b6a3d6f5c8e71e813eaa1c144c70959db29a1c3 100644 (file)
@@ -101,7 +101,7 @@ static void Draw(void)
    glVertex3f( 0.5, -0.5, -30.0);
    glEnd();
 
-//   glLineWidth(12.0);
+   /* glLineWidth(12.0); */
 
    /* Redraw parts of the lines:
     */
index f018a851ace16e51a6d8e64342823ae70a1d3108..b8207cd6d8a6511e2f01c2b78e95241df9db7a1a 100644 (file)
@@ -105,7 +105,7 @@ static void Draw(void)
    glVertex3f( 0.5, -0.5, -30.0);
    glEnd();
 
-//   glLineWidth(12.0);
+   /* glLineWidth(12.0); */
 
    /* Redraw parts of the lines to remove them:
     */
index c29954b90330b9b0f20422ff3f1a23539612d657..cb26e841156d02d2e279c29a3f3e15fdfd620deb 100644 (file)
@@ -83,7 +83,7 @@ static void Display( void )
 
    glEnable(GL_VERTEX_PROGRAM_ARB);
 
-//   glDrawArrays( GL_TRIANGLES, 0, 3 );
+   /* glDrawArrays( GL_TRIANGLES, 0, 3 ); */
    glDrawArrays( GL_TRIANGLES, 1, 3 );
 
    glFlush(); 
index 0672ca50ff193a11b88f4d7b53a7269267be673a..f7c42a89818273176dc6df6b0d2408f20df9bde3 100644 (file)
@@ -87,8 +87,8 @@ static void Display( void )
 
    glEnable(GL_VERTEX_PROGRAM_ARB);
 
-//   glDrawArrays( GL_TRIANGLES, 0, 3 );
-//   glDrawArrays( GL_TRIANGLES, 1, 3 );
+   /* glDrawArrays( GL_TRIANGLES, 0, 3 ); */
+   /* glDrawArrays( GL_TRIANGLES, 1, 3 ); */
    glDrawArrays( GL_QUADS, 0, 4 );
 
    glFlush(); 
index 8c7053548292cb5f6f5275ec2c5db7e33034ecb4..640c902c136c140fab1f964b46eee1d197fdc016 100644 (file)
@@ -187,7 +187,7 @@ redraw(Display *dpy)
        * Without this glClear(), depth buffer for the second process
        * is pretty much broken.
        */
-      /*glClear(GL_DEPTH_BUFFER_BIT);*/
+      /* glClear(GL_DEPTH_BUFFER_BIT); */
 
       glPushMatrix();
       glTranslatef(1, 0, 0);
index d7420678ff0f7de0079e9b1a0716a4557208416c..16b05d5cd9a462a00325ab1e5a602565d126a76b 100644 (file)
@@ -705,6 +705,10 @@ static void r700UpdateCulling(GLcontext * ctx)
             CLEARbit(r700->PA_SU_SC_MODE_CNTL.u32All, FACE_bit); /* default: ccw */
             break;
     }
+
+    /* Winding is inverted when rendering to FBO */
+    if (ctx->DrawBuffer && ctx->DrawBuffer->Name)
+           r700->PA_SU_SC_MODE_CNTL.u32All ^= FACE_bit;
 }
 
 static void r700UpdateLineStipple(GLcontext * ctx)
@@ -1227,13 +1231,8 @@ static void r700UpdatePolygonMode(GLcontext * ctx)
                /* Handle GL_CW (clock wise and GL_CCW (counter clock wise)
                 * correctly by selecting the correct front and back face
                 */
-               if (ctx->Polygon.FrontFace == GL_CCW) {
-                       f = ctx->Polygon.FrontMode;
-                       b = ctx->Polygon.BackMode;
-               } else {
-                       f = ctx->Polygon.BackMode;
-                       b = ctx->Polygon.FrontMode;
-               }
+               f = ctx->Polygon.FrontMode;
+               b = ctx->Polygon.BackMode;
 
                /* Enable polygon mode */
                SETfield(r700->PA_SU_SC_MODE_CNTL.u32All, X_DUAL_MODE, POLY_MODE_shift, POLY_MODE_mask);
index 325de4b083d45452208f7a9f58545501e632cd3d..81e032081db451e69167d33f580ccf63e5f8f0e3 100644 (file)
@@ -68,7 +68,7 @@ GenericFunc
 _mesa_dlsym(void *handle, const char *fname)
 {
 #if defined(__blrts)
-   return (GenericFunc) NULL
+   return (GenericFunc) NULL;
 #elif defined(__DJGPP__)
    /* need '_' prefix on symbol names */
    char fname2[1000];
index a2708884437a906ccd4918837599859c485906f3..499e16e2de9eb82f5fdd3a4ecfa218baf293a859 100644 (file)
@@ -2738,6 +2738,7 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader)
    slang_info_log info_log;
    slang_code_object obj;
    slang_unit_type type;
+   GLenum progTarget;
 
    if (shader->Type == GL_VERTEX_SHADER) {
       type = SLANG_UNIT_VERTEX_SHADER;
@@ -2754,17 +2755,18 @@ _slang_compile(GLcontext *ctx, struct gl_shader *shader)
 
    shader->Main = GL_FALSE;
 
-   if (!shader->Program) {
-      GLenum progTarget;
-      if (shader->Type == GL_VERTEX_SHADER)
-         progTarget = GL_VERTEX_PROGRAM_ARB;
-      else
-         progTarget = GL_FRAGMENT_PROGRAM_ARB;
-      shader->Program = ctx->Driver.NewProgram(ctx, progTarget, 1);
-      shader->Program->Parameters = _mesa_new_parameter_list();
-      shader->Program->Varying = _mesa_new_parameter_list();
-      shader->Program->Attributes = _mesa_new_parameter_list();
-   }
+   /* free the shader's old instructions, etc */
+   _mesa_reference_program(ctx, &shader->Program, NULL);
+
+   /* allocate new GPU program, parameter lists, etc. */
+   if (shader->Type == GL_VERTEX_SHADER)
+      progTarget = GL_VERTEX_PROGRAM_ARB;
+   else
+      progTarget = GL_FRAGMENT_PROGRAM_ARB;
+   shader->Program = ctx->Driver.NewProgram(ctx, progTarget, 1);
+   shader->Program->Parameters = _mesa_new_parameter_list();
+   shader->Program->Varying = _mesa_new_parameter_list();
+   shader->Program->Attributes = _mesa_new_parameter_list();
 
    slang_info_log_construct(&info_log);
    _slang_code_object_ctr(&obj);
index 16ca2771b0fc93c975aadb9659c8cfc84932cd65..2d404d5f4224002c325a1c092af289c44979b3f3 100644 (file)
@@ -219,6 +219,9 @@ st_generate_mipmap(GLcontext *ctx, GLenum target,
    /* find expected last mipmap level */
    lastLevel = compute_num_levels(ctx, texObj, target) - 1;
 
+   if (lastLevel == 0)
+      return;
+
    if (pt->last_level < lastLevel) {
       /* The current gallium texture doesn't have space for all the
        * mipmap levels we need to generate.  So allocate a new texture.