Merge branch '7.8'
[mesa.git] / progs / samples / overlay.c
index 0def2b1105e0ece1f8608b3aa00dde969fb02a48..6087cef281547eb97b5ee5e730d79867c656c265 100644 (file)
@@ -69,19 +69,19 @@ starRec stars[MAXSTARS];
 float sinTable[MAXANGLES];
 
 
-float Sin(float angle)
+static float Sin(float angle)
 {
 
     return (sinTable[(GLint)angle]);
 }
 
-float Cos(float angle)
+static float Cos(float angle)
 {
 
     return (sinTable[((GLint)angle+(MAXANGLES/4))%MAXANGLES]);
 }
 
-void NewStar(GLint n, GLint d)
+static void NewStar(GLint n, GLint d)
 {
 
     if (rand()%4 == 0) {
@@ -103,7 +103,7 @@ void NewStar(GLint n, GLint d)
     }
 }
 
-void RotatePoint(float *x, float *y, float rotation)
+static void RotatePoint(float *x, float *y, float rotation)
 {
     float tmpX, tmpY;
 
@@ -113,7 +113,7 @@ void RotatePoint(float *x, float *y, float rotation)
     *y = tmpY;
 }
 
-void MoveStars(void)
+static void MoveStars(void)
 {
     float offset;
     GLint n;
@@ -134,7 +134,7 @@ void MoveStars(void)
     }
 }
 
-GLenum StarPoint(GLint n)
+static GLenum StarPoint(GLint n)
 {
     float x0, y0, x1, y1, width;
     GLint i;
@@ -182,7 +182,7 @@ GLenum StarPoint(GLint n)
     }
 }
 
-void ShowStars(void)
+static void ShowStars(void)
 {
     GLint n;
 
@@ -221,7 +221,7 @@ static void Init(void)
     glDisable(GL_DITHER);
 }
 
-void Reshape(int width, int height)
+static void Reshape(int width, int height)
 {
 
     windW = (GLint)width;
@@ -262,7 +262,7 @@ static void Key(unsigned char key, int x, int y)
     }
 }
 
-void Idle(void)
+static void Idle(void)
 {
 
     if (overlayInit == GL_FALSE) {
@@ -326,7 +326,7 @@ static GLenum Args(int argc, char **argv)
 {
     GLint i;
 
-    doubleBuffer = GL_FALSE;
+    doubleBuffer = GL_TRUE;
 
     for (i = 1; i < argc; i++) {
        if (strcmp(argv[i], "-sb") == 0) {
@@ -347,7 +347,7 @@ int main(int argc, char **argv)
     if (!glutLayerGet(GLUT_OVERLAY_POSSIBLE))
     {
        fprintf(stderr, "Overlay not available\n");
-       return;
+       return(1);
     }
 
     if (Args(argc, argv) == GL_FALSE) {