summaryrefslogtreecommitdiff
path: root/progs/trivial
diff options
context:
space:
mode:
Diffstat (limited to 'progs/trivial')
-rw-r--r--progs/trivial/.gitignore1
-rw-r--r--progs/trivial/Makefile1
-rw-r--r--progs/trivial/SConscript11
-rw-r--r--progs/trivial/clear-fbo-tex.c6
-rw-r--r--progs/trivial/clear-fbo.c2
-rw-r--r--progs/trivial/clear-random.c2
-rw-r--r--progs/trivial/clear-scissor.c2
-rw-r--r--progs/trivial/clear.c2
-rw-r--r--progs/trivial/createwin.c4
-rw-r--r--progs/trivial/dlist-begin-call-end.c4
-rw-r--r--progs/trivial/dlist-dangling.c2
-rw-r--r--progs/trivial/dlist-edgeflag-dangling.c2
-rw-r--r--progs/trivial/dlist-edgeflag.c2
-rw-r--r--progs/trivial/dlist-flat-tri.c2
-rw-r--r--progs/trivial/dlist-mat-tri.c2
-rw-r--r--progs/trivial/dlist-recursive-call.c2
-rw-r--r--progs/trivial/dlist-tri-flat-tri.c2
-rw-r--r--progs/trivial/dlist-tri-mat-tri.c2
-rw-r--r--progs/trivial/draw2arrays.c2
-rw-r--r--progs/trivial/drawarrays.c2
-rw-r--r--progs/trivial/line-clip.c2
-rw-r--r--progs/trivial/line-cull.c2
-rw-r--r--progs/trivial/line-flat.c2
-rw-r--r--progs/trivial/line-stipple-wide.c2
-rw-r--r--progs/trivial/line-userclip-clip.c2
-rw-r--r--progs/trivial/line-userclip-nop-clip.c2
-rw-r--r--progs/trivial/line-userclip-nop.c2
-rw-r--r--progs/trivial/line-userclip.c2
-rw-r--r--progs/trivial/line-wide.c2
-rw-r--r--progs/trivial/line.c2
-rw-r--r--progs/trivial/lineloop-clip.c2
-rw-r--r--progs/trivial/lineloop.c2
-rw-r--r--progs/trivial/linestrip-clip.c2
-rw-r--r--progs/trivial/linestrip-flat-stipple.c2
-rw-r--r--progs/trivial/linestrip-stipple-wide.c2
-rw-r--r--progs/trivial/linestrip-stipple.c2
-rw-r--r--progs/trivial/linestrip.c2
-rw-r--r--progs/trivial/point-clip.c2
-rw-r--r--progs/trivial/point-param.c2
-rw-r--r--progs/trivial/point-sprite.c2
-rw-r--r--progs/trivial/point-wide-smooth.c2
-rw-r--r--progs/trivial/point-wide.c2
-rw-r--r--progs/trivial/point.c2
-rw-r--r--progs/trivial/poly-flat-clip.c2
-rw-r--r--progs/trivial/poly-flat-unfilled-clip.c2
-rw-r--r--progs/trivial/poly-flat.c2
-rw-r--r--progs/trivial/poly-unfilled.c2
-rw-r--r--progs/trivial/poly.c2
-rw-r--r--progs/trivial/quad-clip-all-vertices.c2
-rw-r--r--progs/trivial/quad-clip.c2
-rw-r--r--progs/trivial/quad-degenerate.c2
-rw-r--r--progs/trivial/quad-flat.c2
-rw-r--r--progs/trivial/quad-offset-factor.c2
-rw-r--r--progs/trivial/quad-offset-unfilled.c2
-rw-r--r--progs/trivial/quad-offset-units.c2
-rw-r--r--progs/trivial/quad-tex-alpha.c2
-rw-r--r--progs/trivial/quad-tex-pbo.c2
-rw-r--r--progs/trivial/quad-unfilled-clip.c2
-rw-r--r--progs/trivial/quad-unfilled-stipple.c2
-rw-r--r--progs/trivial/quad-unfilled.c2
-rw-r--r--progs/trivial/quad.c2
-rw-r--r--progs/trivial/quads.c2
-rw-r--r--progs/trivial/quadstrip-cont.c2
-rw-r--r--progs/trivial/quadstrip-flat.c2
-rw-r--r--progs/trivial/quadstrip.c2
-rw-r--r--progs/trivial/readpixels.c2
-rw-r--r--progs/trivial/tri-alpha-tex.c2
-rw-r--r--progs/trivial/tri-alpha.c2
-rw-r--r--progs/trivial/tri-blend-color.c2
-rw-r--r--progs/trivial/tri-blend-max.c6
-rw-r--r--progs/trivial/tri-blend-min.c6
-rw-r--r--progs/trivial/tri-blend-revsub.c6
-rw-r--r--progs/trivial/tri-blend-sub.c6
-rw-r--r--progs/trivial/tri-blend.c6
-rw-r--r--progs/trivial/tri-clear.c2
-rw-r--r--progs/trivial/tri-clip.c2
-rw-r--r--progs/trivial/tri-cull-both.c2
-rw-r--r--progs/trivial/tri-dlist.c2
-rw-r--r--progs/trivial/tri-fbo-tex.c3
-rw-r--r--progs/trivial/tri-fbo.c2
-rw-r--r--progs/trivial/tri-flat-clip.c2
-rw-r--r--progs/trivial/tri-flat.c2
-rw-r--r--progs/trivial/tri-fog.c2
-rw-r--r--progs/trivial/tri-fp-const-imm.c2
-rw-r--r--progs/trivial/tri-fp.c4
-rw-r--r--progs/trivial/tri-lit-material.c2
-rw-r--r--progs/trivial/tri-lit.c2
-rw-r--r--progs/trivial/tri-logicop-none.c2
-rw-r--r--progs/trivial/tri-logicop-xor.c2
-rw-r--r--progs/trivial/tri-multitex-vbo.c2
-rw-r--r--progs/trivial/tri-orig.c12
-rw-r--r--progs/trivial/tri-query.c2
-rw-r--r--progs/trivial/tri-scissor-tri.c2
-rw-r--r--progs/trivial/tri-square.c2
-rw-r--r--progs/trivial/tri-stipple.c2
-rw-r--r--progs/trivial/tri-tex-3d.c2
-rw-r--r--progs/trivial/tri-tex.c2
-rw-r--r--progs/trivial/tri-tri.c2
-rw-r--r--progs/trivial/tri-unfilled-clip.c2
-rw-r--r--progs/trivial/tri-unfilled-edgeflag.c2
-rw-r--r--progs/trivial/tri-unfilled-point.c2
-rw-r--r--progs/trivial/tri-unfilled-smooth.c2
-rw-r--r--progs/trivial/tri-unfilled-tri-lit.c2
-rw-r--r--progs/trivial/tri-unfilled-tri.c2
-rw-r--r--progs/trivial/tri-unfilled-userclip-stip.c2
-rw-r--r--progs/trivial/tri-unfilled-userclip.c2
-rw-r--r--progs/trivial/tri-unfilled.c2
-rw-r--r--progs/trivial/tri-userclip.c2
-rw-r--r--progs/trivial/tri-z-9.c2
-rw-r--r--progs/trivial/tri-z-eq.c2
-rw-r--r--progs/trivial/tri-z.c6
-rw-r--r--progs/trivial/trifan-flat-clip.c2
-rw-r--r--progs/trivial/trifan-flat-unfilled-clip.c2
-rw-r--r--progs/trivial/trifan-flat.c2
-rw-r--r--progs/trivial/trifan-unfilled.c2
-rw-r--r--progs/trivial/trifan.c2
-rw-r--r--progs/trivial/tristrip-clip.c2
-rw-r--r--progs/trivial/tristrip-flat.c2
-rw-r--r--progs/trivial/tristrip.c2
-rw-r--r--progs/trivial/vbo-drawarrays.c2
-rw-r--r--progs/trivial/vbo-noninterleaved.c4
-rw-r--r--progs/trivial/vbo-tri.c131
-rw-r--r--progs/trivial/vp-tri-cb-pos.c2
-rw-r--r--progs/trivial/vp-tri-cb-tex.c2
-rw-r--r--progs/trivial/vp-tri-invariant.c2
125 files changed, 278 insertions, 155 deletions
diff --git a/progs/trivial/.gitignore b/progs/trivial/.gitignore
index 4d6e405c50..4317eb607f 100644
--- a/progs/trivial/.gitignore
+++ b/progs/trivial/.gitignore
@@ -147,6 +147,7 @@ vbo-drawarrays
vbo-drawelements
vbo-drawrange
vbo-noninterleaved
+vbo-tri
vp-array
vp-array-int
vp-clip
diff --git a/progs/trivial/Makefile b/progs/trivial/Makefile
index 70728616d2..e15ec33ab5 100644
--- a/progs/trivial/Makefile
+++ b/progs/trivial/Makefile
@@ -153,6 +153,7 @@ SOURCES = \
tristrip-clip.c \
tristrip-flat.c \
tristrip.c \
+ vbo-tri.c \
vbo-drawarrays.c \
vbo-noninterleaved.c \
vbo-drawelements.c \
diff --git a/progs/trivial/SConscript b/progs/trivial/SConscript
index 9a1f3575bd..613383c77b 100644
--- a/progs/trivial/SConscript
+++ b/progs/trivial/SConscript
@@ -1,11 +1,4 @@
-Import('env')
-
-if not env['GLUT']:
- Return()
-
-env = env.Clone()
-
-env.Prepend(LIBS = ['$GLUT_LIB'])
+Import('*')
progs = [
'clear-fbo-tex',
@@ -154,7 +147,7 @@ progs = [
]
for prog in progs:
- prog = env.Program(
+ prog = progs_env.Program(
target = prog,
source = prog + '.c',
)
diff --git a/progs/trivial/clear-fbo-tex.c b/progs/trivial/clear-fbo-tex.c
index a206676e48..ff31706fd1 100644
--- a/progs/trivial/clear-fbo-tex.c
+++ b/progs/trivial/clear-fbo-tex.c
@@ -88,7 +88,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
@@ -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);
diff --git a/progs/trivial/clear-fbo.c b/progs/trivial/clear-fbo.c
index 0aeb45489f..6435c901ad 100644
--- a/progs/trivial/clear-fbo.c
+++ b/progs/trivial/clear-fbo.c
@@ -73,7 +73,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/clear-random.c b/progs/trivial/clear-random.c
index e3da23a8f5..ab67f84518 100644
--- a/progs/trivial/clear-random.c
+++ b/progs/trivial/clear-random.c
@@ -61,7 +61,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(0);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/clear-scissor.c b/progs/trivial/clear-scissor.c
index 0173532748..2b6dee77a9 100644
--- a/progs/trivial/clear-scissor.c
+++ b/progs/trivial/clear-scissor.c
@@ -38,7 +38,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
}
diff --git a/progs/trivial/clear.c b/progs/trivial/clear.c
index 03857b4b89..56c3ea52e6 100644
--- a/progs/trivial/clear.c
+++ b/progs/trivial/clear.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(0);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/createwin.c b/progs/trivial/createwin.c
index f2cc6f1cff..93da30ee29 100644
--- a/progs/trivial/createwin.c
+++ b/progs/trivial/createwin.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
@@ -116,6 +116,6 @@ int main(int argc, char **argv)
glutReshapeFunc(Reshape);
glutKeyboardFunc(Key);
glutDisplayFunc(Draw);
-// glutMainLoop();
+ /* glutMainLoop(); */
return 0;
}
diff --git a/progs/trivial/dlist-begin-call-end.c b/progs/trivial/dlist-begin-call-end.c
index 0d0aed7c72..dbfaef3978 100644
--- a/progs/trivial/dlist-begin-call-end.c
+++ b/progs/trivial/dlist-begin-call-end.c
@@ -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();
@@ -87,7 +87,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/dlist-dangling.c b/progs/trivial/dlist-dangling.c
index de10628009..756ab93f87 100644
--- a/progs/trivial/dlist-dangling.c
+++ b/progs/trivial/dlist-dangling.c
@@ -74,7 +74,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/dlist-edgeflag-dangling.c b/progs/trivial/dlist-edgeflag-dangling.c
index 3d3aaeb694..51504471e2 100644
--- a/progs/trivial/dlist-edgeflag-dangling.c
+++ b/progs/trivial/dlist-edgeflag-dangling.c
@@ -76,7 +76,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/dlist-edgeflag.c b/progs/trivial/dlist-edgeflag.c
index 8002129ed1..9456b96473 100644
--- a/progs/trivial/dlist-edgeflag.c
+++ b/progs/trivial/dlist-edgeflag.c
@@ -81,7 +81,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/dlist-flat-tri.c b/progs/trivial/dlist-flat-tri.c
index c3dd7921e3..3ee9b283a4 100644
--- a/progs/trivial/dlist-flat-tri.c
+++ b/progs/trivial/dlist-flat-tri.c
@@ -93,7 +93,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/dlist-mat-tri.c b/progs/trivial/dlist-mat-tri.c
index ed3a4c5981..d17c4b913b 100644
--- a/progs/trivial/dlist-mat-tri.c
+++ b/progs/trivial/dlist-mat-tri.c
@@ -103,7 +103,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/dlist-recursive-call.c b/progs/trivial/dlist-recursive-call.c
index fe06b2bbd7..90224f63cb 100644
--- a/progs/trivial/dlist-recursive-call.c
+++ b/progs/trivial/dlist-recursive-call.c
@@ -118,7 +118,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/dlist-tri-flat-tri.c b/progs/trivial/dlist-tri-flat-tri.c
index 4dbb788486..3265a4d6dc 100644
--- a/progs/trivial/dlist-tri-flat-tri.c
+++ b/progs/trivial/dlist-tri-flat-tri.c
@@ -99,7 +99,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/dlist-tri-mat-tri.c b/progs/trivial/dlist-tri-mat-tri.c
index f69854ae58..053bb124a2 100644
--- a/progs/trivial/dlist-tri-mat-tri.c
+++ b/progs/trivial/dlist-tri-mat-tri.c
@@ -102,7 +102,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/draw2arrays.c b/progs/trivial/draw2arrays.c
index 95a89981d3..2345ae9e9e 100644
--- a/progs/trivial/draw2arrays.c
+++ b/progs/trivial/draw2arrays.c
@@ -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();
diff --git a/progs/trivial/drawarrays.c b/progs/trivial/drawarrays.c
index 27d86682f7..f5c0a50f9a 100644
--- a/progs/trivial/drawarrays.c
+++ b/progs/trivial/drawarrays.c
@@ -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();
diff --git a/progs/trivial/line-clip.c b/progs/trivial/line-clip.c
index 5276baffd5..e4e388ed5c 100644
--- a/progs/trivial/line-clip.c
+++ b/progs/trivial/line-clip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/line-cull.c b/progs/trivial/line-cull.c
index 1e1b77a942..c531ff132f 100644
--- a/progs/trivial/line-cull.c
+++ b/progs/trivial/line-cull.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/line-flat.c b/progs/trivial/line-flat.c
index 14f0ac0782..e2ddb87b9e 100644
--- a/progs/trivial/line-flat.c
+++ b/progs/trivial/line-flat.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/line-stipple-wide.c b/progs/trivial/line-stipple-wide.c
index 1804ffad3f..767583bbea 100644
--- a/progs/trivial/line-stipple-wide.c
+++ b/progs/trivial/line-stipple-wide.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/line-userclip-clip.c b/progs/trivial/line-userclip-clip.c
index 8e030b47ce..3265b2c3bf 100644
--- a/progs/trivial/line-userclip-clip.c
+++ b/progs/trivial/line-userclip-clip.c
@@ -66,7 +66,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/line-userclip-nop-clip.c b/progs/trivial/line-userclip-nop-clip.c
index 6fcd4bcfe7..0198e27807 100644
--- a/progs/trivial/line-userclip-nop-clip.c
+++ b/progs/trivial/line-userclip-nop-clip.c
@@ -66,7 +66,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/line-userclip-nop.c b/progs/trivial/line-userclip-nop.c
index e59fd133a5..6c863a3c82 100644
--- a/progs/trivial/line-userclip-nop.c
+++ b/progs/trivial/line-userclip-nop.c
@@ -66,7 +66,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/line-userclip.c b/progs/trivial/line-userclip.c
index e30be5580b..6cfcb6fc73 100644
--- a/progs/trivial/line-userclip.c
+++ b/progs/trivial/line-userclip.c
@@ -66,7 +66,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/line-wide.c b/progs/trivial/line-wide.c
index b74021dea7..1945712c5d 100644
--- a/progs/trivial/line-wide.c
+++ b/progs/trivial/line-wide.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/line.c b/progs/trivial/line.c
index e1d73280bf..58ab96836f 100644
--- a/progs/trivial/line.c
+++ b/progs/trivial/line.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/lineloop-clip.c b/progs/trivial/lineloop-clip.c
index 45fa47491f..5e6b6217a1 100644
--- a/progs/trivial/lineloop-clip.c
+++ b/progs/trivial/lineloop-clip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/lineloop.c b/progs/trivial/lineloop.c
index c290dbd8cb..82eccd24f8 100644
--- a/progs/trivial/lineloop.c
+++ b/progs/trivial/lineloop.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/linestrip-clip.c b/progs/trivial/linestrip-clip.c
index f252822921..5e90ea2eb0 100644
--- a/progs/trivial/linestrip-clip.c
+++ b/progs/trivial/linestrip-clip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/linestrip-flat-stipple.c b/progs/trivial/linestrip-flat-stipple.c
index 5caa724423..bae5c3a1c3 100644
--- a/progs/trivial/linestrip-flat-stipple.c
+++ b/progs/trivial/linestrip-flat-stipple.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/linestrip-stipple-wide.c b/progs/trivial/linestrip-stipple-wide.c
index 701c82c266..0296941a0d 100644
--- a/progs/trivial/linestrip-stipple-wide.c
+++ b/progs/trivial/linestrip-stipple-wide.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/linestrip-stipple.c b/progs/trivial/linestrip-stipple.c
index df2eef96b5..a847d47dee 100644
--- a/progs/trivial/linestrip-stipple.c
+++ b/progs/trivial/linestrip-stipple.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/linestrip.c b/progs/trivial/linestrip.c
index 0219b1ab70..b6d6882146 100644
--- a/progs/trivial/linestrip.c
+++ b/progs/trivial/linestrip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/point-clip.c b/progs/trivial/point-clip.c
index 4c89ba598d..23cfd77863 100644
--- a/progs/trivial/point-clip.c
+++ b/progs/trivial/point-clip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/point-param.c b/progs/trivial/point-param.c
index 6f43720a89..46bd773265 100644
--- a/progs/trivial/point-param.c
+++ b/progs/trivial/point-param.c
@@ -59,7 +59,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
}
diff --git a/progs/trivial/point-sprite.c b/progs/trivial/point-sprite.c
index 5d29a6a3cf..16e6771514 100644
--- a/progs/trivial/point-sprite.c
+++ b/progs/trivial/point-sprite.c
@@ -96,7 +96,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/point-wide-smooth.c b/progs/trivial/point-wide-smooth.c
index f6e9b8df5f..752cb8aee3 100644
--- a/progs/trivial/point-wide-smooth.c
+++ b/progs/trivial/point-wide-smooth.c
@@ -63,7 +63,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/point-wide.c b/progs/trivial/point-wide.c
index 8abd64c6a9..3b00ee9e50 100644
--- a/progs/trivial/point-wide.c
+++ b/progs/trivial/point-wide.c
@@ -63,7 +63,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/point.c b/progs/trivial/point.c
index 49959dcc48..8f5299cf6b 100644
--- a/progs/trivial/point.c
+++ b/progs/trivial/point.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/poly-flat-clip.c b/progs/trivial/poly-flat-clip.c
index 5490068b08..2a968bed40 100644
--- a/progs/trivial/poly-flat-clip.c
+++ b/progs/trivial/poly-flat-clip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/poly-flat-unfilled-clip.c b/progs/trivial/poly-flat-unfilled-clip.c
index 26b90ef964..89f4e0656a 100644
--- a/progs/trivial/poly-flat-unfilled-clip.c
+++ b/progs/trivial/poly-flat-unfilled-clip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/poly-flat.c b/progs/trivial/poly-flat.c
index a4e3cdb633..33c2e04e0f 100644
--- a/progs/trivial/poly-flat.c
+++ b/progs/trivial/poly-flat.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/poly-unfilled.c b/progs/trivial/poly-unfilled.c
index 2ad443dc15..c8c0d7a9e3 100644
--- a/progs/trivial/poly-unfilled.c
+++ b/progs/trivial/poly-unfilled.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/poly.c b/progs/trivial/poly.c
index e5b788ea5b..964eb42d78 100644
--- a/progs/trivial/poly.c
+++ b/progs/trivial/poly.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quad-clip-all-vertices.c b/progs/trivial/quad-clip-all-vertices.c
index 60c87fc9ce..7712d8ca5b 100644
--- a/progs/trivial/quad-clip-all-vertices.c
+++ b/progs/trivial/quad-clip-all-vertices.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quad-clip.c b/progs/trivial/quad-clip.c
index 063de6106a..2847c9f960 100644
--- a/progs/trivial/quad-clip.c
+++ b/progs/trivial/quad-clip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quad-degenerate.c b/progs/trivial/quad-degenerate.c
index fdc142bcd6..85e129d4be 100644
--- a/progs/trivial/quad-degenerate.c
+++ b/progs/trivial/quad-degenerate.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quad-flat.c b/progs/trivial/quad-flat.c
index e3147b3b3f..bed98e31a4 100644
--- a/progs/trivial/quad-flat.c
+++ b/progs/trivial/quad-flat.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quad-offset-factor.c b/progs/trivial/quad-offset-factor.c
index dfe99bbae6..1fc57a54ae 100644
--- a/progs/trivial/quad-offset-factor.c
+++ b/progs/trivial/quad-offset-factor.c
@@ -55,7 +55,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quad-offset-unfilled.c b/progs/trivial/quad-offset-unfilled.c
index 06590021fe..62f50fb98c 100644
--- a/progs/trivial/quad-offset-unfilled.c
+++ b/progs/trivial/quad-offset-unfilled.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quad-offset-units.c b/progs/trivial/quad-offset-units.c
index 922529d977..1ac2338692 100644
--- a/progs/trivial/quad-offset-units.c
+++ b/progs/trivial/quad-offset-units.c
@@ -55,7 +55,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quad-tex-alpha.c b/progs/trivial/quad-tex-alpha.c
index eebaf9170e..9db6792fad 100644
--- a/progs/trivial/quad-tex-alpha.c
+++ b/progs/trivial/quad-tex-alpha.c
@@ -88,7 +88,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quad-tex-pbo.c b/progs/trivial/quad-tex-pbo.c
index ad41a9a22e..b7aa1db436 100644
--- a/progs/trivial/quad-tex-pbo.c
+++ b/progs/trivial/quad-tex-pbo.c
@@ -105,7 +105,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quad-unfilled-clip.c b/progs/trivial/quad-unfilled-clip.c
index 761878bd4b..d2e8718775 100644
--- a/progs/trivial/quad-unfilled-clip.c
+++ b/progs/trivial/quad-unfilled-clip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quad-unfilled-stipple.c b/progs/trivial/quad-unfilled-stipple.c
index cd7d276928..8c1737e675 100644
--- a/progs/trivial/quad-unfilled-stipple.c
+++ b/progs/trivial/quad-unfilled-stipple.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quad-unfilled.c b/progs/trivial/quad-unfilled.c
index d64f17fdf9..b756449d7a 100644
--- a/progs/trivial/quad-unfilled.c
+++ b/progs/trivial/quad-unfilled.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quad.c b/progs/trivial/quad.c
index d360e309d3..582de783d5 100644
--- a/progs/trivial/quad.c
+++ b/progs/trivial/quad.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quads.c b/progs/trivial/quads.c
index fe11fef207..de7854a255 100644
--- a/progs/trivial/quads.c
+++ b/progs/trivial/quads.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quadstrip-cont.c b/progs/trivial/quadstrip-cont.c
index 329523531a..44412698dc 100644
--- a/progs/trivial/quadstrip-cont.c
+++ b/progs/trivial/quadstrip-cont.c
@@ -57,7 +57,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quadstrip-flat.c b/progs/trivial/quadstrip-flat.c
index 228c6c255e..0e0b3b49fa 100644
--- a/progs/trivial/quadstrip-flat.c
+++ b/progs/trivial/quadstrip-flat.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/quadstrip.c b/progs/trivial/quadstrip.c
index d49a9a5302..1be815fb8c 100644
--- a/progs/trivial/quadstrip.c
+++ b/progs/trivial/quadstrip.c
@@ -57,7 +57,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/readpixels.c b/progs/trivial/readpixels.c
index 5671618446..b063f17956 100644
--- a/progs/trivial/readpixels.c
+++ b/progs/trivial/readpixels.c
@@ -39,7 +39,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(0);
default:
- return;
+ break;
}
glutPostRedisplay();
}
diff --git a/progs/trivial/tri-alpha-tex.c b/progs/trivial/tri-alpha-tex.c
index 780ebe6be5..853d564ae7 100644
--- a/progs/trivial/tri-alpha-tex.c
+++ b/progs/trivial/tri-alpha-tex.c
@@ -88,7 +88,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-alpha.c b/progs/trivial/tri-alpha.c
index aec1cbb377..bd1c88ecf8 100644
--- a/progs/trivial/tri-alpha.c
+++ b/progs/trivial/tri-alpha.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-blend-color.c b/progs/trivial/tri-blend-color.c
index 92f019259e..629b35c4ab 100644
--- a/progs/trivial/tri-blend-color.c
+++ b/progs/trivial/tri-blend-color.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-blend-max.c b/progs/trivial/tri-blend-max.c
index b39f8f3f12..b173dab8ec 100644
--- a/progs/trivial/tri-blend-max.c
+++ b/progs/trivial/tri-blend-max.c
@@ -83,7 +83,7 @@ static void drawRightTriangle(void)
glDisable (GL_BLEND);
}
-void display(void)
+static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
@@ -99,7 +99,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);
@@ -111,7 +111,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':
diff --git a/progs/trivial/tri-blend-min.c b/progs/trivial/tri-blend-min.c
index 656297c0ce..629139acae 100644
--- a/progs/trivial/tri-blend-min.c
+++ b/progs/trivial/tri-blend-min.c
@@ -83,7 +83,7 @@ static void drawRightTriangle(void)
glDisable (GL_BLEND);
}
-void display(void)
+static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
@@ -99,7 +99,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);
@@ -111,7 +111,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':
diff --git a/progs/trivial/tri-blend-revsub.c b/progs/trivial/tri-blend-revsub.c
index fe225f1f4e..ef1e92c85d 100644
--- a/progs/trivial/tri-blend-revsub.c
+++ b/progs/trivial/tri-blend-revsub.c
@@ -83,7 +83,7 @@ static void drawRightTriangle(void)
glDisable (GL_BLEND);
}
-void display(void)
+static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
@@ -99,7 +99,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);
@@ -111,7 +111,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':
diff --git a/progs/trivial/tri-blend-sub.c b/progs/trivial/tri-blend-sub.c
index cc1aeaf4a4..3c560ae6ef 100644
--- a/progs/trivial/tri-blend-sub.c
+++ b/progs/trivial/tri-blend-sub.c
@@ -83,7 +83,7 @@ static void drawRightTriangle(void)
glDisable (GL_BLEND);
}
-void display(void)
+static void display(void)
{
glClear(GL_COLOR_BUFFER_BIT);
@@ -99,7 +99,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);
@@ -111,7 +111,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':
diff --git a/progs/trivial/tri-blend.c b/progs/trivial/tri-blend.c
index 58c451c976..f41be89b09 100644
--- a/progs/trivial/tri-blend.c
+++ b/progs/trivial/tri-blend.c
@@ -81,7 +81,7 @@ static void drawRightTriangle(void)
glDisable (GL_BLEND);
}
-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, (GLsizei) w, (GLsizei) h);
glMatrixMode(GL_PROJECTION);
@@ -109,7 +109,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':
diff --git a/progs/trivial/tri-clear.c b/progs/trivial/tri-clear.c
index f49186bd8a..e52ed81bf4 100644
--- a/progs/trivial/tri-clear.c
+++ b/progs/trivial/tri-clear.c
@@ -63,7 +63,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-clip.c b/progs/trivial/tri-clip.c
index e1deca1bdc..3e3879c985 100644
--- a/progs/trivial/tri-clip.c
+++ b/progs/trivial/tri-clip.c
@@ -56,7 +56,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
}
diff --git a/progs/trivial/tri-cull-both.c b/progs/trivial/tri-cull-both.c
index 864be710c2..809599d4a6 100644
--- a/progs/trivial/tri-cull-both.c
+++ b/progs/trivial/tri-cull-both.c
@@ -65,7 +65,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-dlist.c b/progs/trivial/tri-dlist.c
index c410be221a..62d0a965d8 100644
--- a/progs/trivial/tri-dlist.c
+++ b/progs/trivial/tri-dlist.c
@@ -75,7 +75,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-fbo-tex.c b/progs/trivial/tri-fbo-tex.c
index 72b4cf3683..8d1f871328 100644
--- a/progs/trivial/tri-fbo-tex.c
+++ b/progs/trivial/tri-fbo-tex.c
@@ -189,9 +189,6 @@ Key(unsigned char key, int x, int y)
static void
Init(int argc, char *argv[])
{
- static const GLfloat mat[4] = { 1.0, 0.5, 0.5, 1.0 };
- GLint i;
-
if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
printf("GL_EXT_framebuffer_object not found!\n");
exit(0);
diff --git a/progs/trivial/tri-fbo.c b/progs/trivial/tri-fbo.c
index 1ed177ffdf..089180f97a 100644
--- a/progs/trivial/tri-fbo.c
+++ b/progs/trivial/tri-fbo.c
@@ -75,7 +75,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-flat-clip.c b/progs/trivial/tri-flat-clip.c
index 2aab5ba00a..a23f8a382b 100644
--- a/progs/trivial/tri-flat-clip.c
+++ b/progs/trivial/tri-flat-clip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-flat.c b/progs/trivial/tri-flat.c
index ea703ec6f3..0614321844 100644
--- a/progs/trivial/tri-flat.c
+++ b/progs/trivial/tri-flat.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-fog.c b/progs/trivial/tri-fog.c
index 0cea3d3258..7fc254a467 100644
--- a/progs/trivial/tri-fog.c
+++ b/progs/trivial/tri-fog.c
@@ -72,7 +72,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-fp-const-imm.c b/progs/trivial/tri-fp-const-imm.c
index d2df442abf..accea62042 100644
--- a/progs/trivial/tri-fp-const-imm.c
+++ b/progs/trivial/tri-fp-const-imm.c
@@ -92,7 +92,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-fp.c b/progs/trivial/tri-fp.c
index 4d1508120e..6ecfef4d2a 100644
--- a/progs/trivial/tri-fp.c
+++ b/progs/trivial/tri-fp.c
@@ -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";
@@ -90,7 +90,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-lit-material.c b/progs/trivial/tri-lit-material.c
index ff9fb2c4dd..16cebb2b98 100644
--- a/progs/trivial/tri-lit-material.c
+++ b/progs/trivial/tri-lit-material.c
@@ -65,7 +65,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-lit.c b/progs/trivial/tri-lit.c
index 15a7ad24c5..26ebd99d91 100644
--- a/progs/trivial/tri-lit.c
+++ b/progs/trivial/tri-lit.c
@@ -65,7 +65,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-logicop-none.c b/progs/trivial/tri-logicop-none.c
index 53c2614ac3..2b6a3d6f5c 100644
--- a/progs/trivial/tri-logicop-none.c
+++ b/progs/trivial/tri-logicop-none.c
@@ -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:
*/
diff --git a/progs/trivial/tri-logicop-xor.c b/progs/trivial/tri-logicop-xor.c
index f018a851ac..b8207cd6d8 100644
--- a/progs/trivial/tri-logicop-xor.c
+++ b/progs/trivial/tri-logicop-xor.c
@@ -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:
*/
diff --git a/progs/trivial/tri-multitex-vbo.c b/progs/trivial/tri-multitex-vbo.c
index e319447ac1..ca4edaa5dd 100644
--- a/progs/trivial/tri-multitex-vbo.c
+++ b/progs/trivial/tri-multitex-vbo.c
@@ -192,7 +192,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-orig.c b/progs/trivial/tri-orig.c
index e7cfee3a36..f86ac52a02 100644
--- a/progs/trivial/tri-orig.c
+++ b/progs/trivial/tri-orig.c
@@ -51,7 +51,7 @@ static void Reshape(int width, int height)
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
-/* glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); */
+ glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
glMatrixMode(GL_MODELVIEW);
}
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
@@ -74,11 +74,11 @@ static void Draw(void)
glBegin(GL_TRIANGLES);
glColor3f(0,0,.7);
- glVertex3f( 0.9, -0.9, -0.0);
+ glVertex3f( 0.9, -0.9, -30.0);
glColor3f(.8,0,0);
- glVertex3f( 0.9, 0.9, -0.0);
+ glVertex3f( 0.9, 0.9, -30.0);
glColor3f(0,.9,0);
- glVertex3f(-0.9, 0.0, -0.0);
+ glVertex3f(-0.9, 0.0, -30.0);
glEnd();
glFlush();
@@ -119,7 +119,7 @@ int main(int argc, char **argv)
glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
- type = GLUT_RGB | GLUT_ALPHA;
+ type = GLUT_RGB;
type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
glutInitDisplayMode(type);
diff --git a/progs/trivial/tri-query.c b/progs/trivial/tri-query.c
index 94956a86f3..8898f182c7 100644
--- a/progs/trivial/tri-query.c
+++ b/progs/trivial/tri-query.c
@@ -72,7 +72,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-scissor-tri.c b/progs/trivial/tri-scissor-tri.c
index 608ebf29cf..d65502d91b 100644
--- a/progs/trivial/tri-scissor-tri.c
+++ b/progs/trivial/tri-scissor-tri.c
@@ -63,7 +63,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-square.c b/progs/trivial/tri-square.c
index 0b82a1dd8e..2014bd489c 100644
--- a/progs/trivial/tri-square.c
+++ b/progs/trivial/tri-square.c
@@ -63,7 +63,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-stipple.c b/progs/trivial/tri-stipple.c
index aa94fa224b..15a08fec7c 100644
--- a/progs/trivial/tri-stipple.c
+++ b/progs/trivial/tri-stipple.c
@@ -77,7 +77,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-tex-3d.c b/progs/trivial/tri-tex-3d.c
index 3ccbe12510..073a080d7a 100644
--- a/progs/trivial/tri-tex-3d.c
+++ b/progs/trivial/tri-tex-3d.c
@@ -97,7 +97,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-tex.c b/progs/trivial/tri-tex.c
index 56afb4748d..244e154504 100644
--- a/progs/trivial/tri-tex.c
+++ b/progs/trivial/tri-tex.c
@@ -94,7 +94,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-tri.c b/progs/trivial/tri-tri.c
index f996bd01a1..7bf400793e 100644
--- a/progs/trivial/tri-tri.c
+++ b/progs/trivial/tri-tri.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-unfilled-clip.c b/progs/trivial/tri-unfilled-clip.c
index 2fd894a49a..585919e16d 100644
--- a/progs/trivial/tri-unfilled-clip.c
+++ b/progs/trivial/tri-unfilled-clip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-unfilled-edgeflag.c b/progs/trivial/tri-unfilled-edgeflag.c
index 11c21d1bf6..f536f64229 100644
--- a/progs/trivial/tri-unfilled-edgeflag.c
+++ b/progs/trivial/tri-unfilled-edgeflag.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-unfilled-point.c b/progs/trivial/tri-unfilled-point.c
index 750a254669..11e276e1a5 100644
--- a/progs/trivial/tri-unfilled-point.c
+++ b/progs/trivial/tri-unfilled-point.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-unfilled-smooth.c b/progs/trivial/tri-unfilled-smooth.c
index eddae176e5..fa31667e65 100644
--- a/progs/trivial/tri-unfilled-smooth.c
+++ b/progs/trivial/tri-unfilled-smooth.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-unfilled-tri-lit.c b/progs/trivial/tri-unfilled-tri-lit.c
index 1d42b40b71..d6baeb4697 100644
--- a/progs/trivial/tri-unfilled-tri-lit.c
+++ b/progs/trivial/tri-unfilled-tri-lit.c
@@ -65,7 +65,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-unfilled-tri.c b/progs/trivial/tri-unfilled-tri.c
index 695cc89095..75a70b8a41 100644
--- a/progs/trivial/tri-unfilled-tri.c
+++ b/progs/trivial/tri-unfilled-tri.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-unfilled-userclip-stip.c b/progs/trivial/tri-unfilled-userclip-stip.c
index ddc0dffd4f..02bfa92f83 100644
--- a/progs/trivial/tri-unfilled-userclip-stip.c
+++ b/progs/trivial/tri-unfilled-userclip-stip.c
@@ -67,7 +67,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-unfilled-userclip.c b/progs/trivial/tri-unfilled-userclip.c
index 0dec0bfc9b..11e53fc7cc 100644
--- a/progs/trivial/tri-unfilled-userclip.c
+++ b/progs/trivial/tri-unfilled-userclip.c
@@ -66,7 +66,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-unfilled.c b/progs/trivial/tri-unfilled.c
index b98cb9a842..afa1058dad 100644
--- a/progs/trivial/tri-unfilled.c
+++ b/progs/trivial/tri-unfilled.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-userclip.c b/progs/trivial/tri-userclip.c
index 8f37e0fae2..5651c73832 100644
--- a/progs/trivial/tri-userclip.c
+++ b/progs/trivial/tri-userclip.c
@@ -66,7 +66,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-z-9.c b/progs/trivial/tri-z-9.c
index 099e89f6f4..37b9e2f873 100644
--- a/progs/trivial/tri-z-9.c
+++ b/progs/trivial/tri-z-9.c
@@ -61,7 +61,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-z-eq.c b/progs/trivial/tri-z-eq.c
index b81c992f7d..6bdac47419 100644
--- a/progs/trivial/tri-z-eq.c
+++ b/progs/trivial/tri-z-eq.c
@@ -61,7 +61,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tri-z.c b/progs/trivial/tri-z.c
index 014aaa071a..092249dd76 100644
--- a/progs/trivial/tri-z.c
+++ b/progs/trivial/tri-z.c
@@ -101,7 +101,7 @@ static void drawRightTriangle(void)
glEnd();
}
-void display(void)
+static void display(void)
{
printf("GL_CLEAR_DEPTH = %.2f, GL_DEPTH_FUNC = %s, DepthRange(%.1f, %.1f)\n",
clearVal, funcs[curFunc].str, minZ, maxZ);
@@ -124,7 +124,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);
@@ -136,7 +136,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 'n':
diff --git a/progs/trivial/trifan-flat-clip.c b/progs/trivial/trifan-flat-clip.c
index 199f91a637..89bc471191 100644
--- a/progs/trivial/trifan-flat-clip.c
+++ b/progs/trivial/trifan-flat-clip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/trifan-flat-unfilled-clip.c b/progs/trivial/trifan-flat-unfilled-clip.c
index ea3e155387..3a1a226e54 100644
--- a/progs/trivial/trifan-flat-unfilled-clip.c
+++ b/progs/trivial/trifan-flat-unfilled-clip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/trifan-flat.c b/progs/trivial/trifan-flat.c
index d69b4887e3..d25abdf49e 100644
--- a/progs/trivial/trifan-flat.c
+++ b/progs/trivial/trifan-flat.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/trifan-unfilled.c b/progs/trivial/trifan-unfilled.c
index 91447e4e44..2e3ff8218f 100644
--- a/progs/trivial/trifan-unfilled.c
+++ b/progs/trivial/trifan-unfilled.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/trifan.c b/progs/trivial/trifan.c
index 84eb4172de..b8a7615114 100644
--- a/progs/trivial/trifan.c
+++ b/progs/trivial/trifan.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tristrip-clip.c b/progs/trivial/tristrip-clip.c
index 343e293804..4e6ee1fbca 100644
--- a/progs/trivial/tristrip-clip.c
+++ b/progs/trivial/tristrip-clip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tristrip-flat.c b/progs/trivial/tristrip-flat.c
index 02da97efce..a90b8b6cb6 100644
--- a/progs/trivial/tristrip-flat.c
+++ b/progs/trivial/tristrip-flat.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/tristrip.c b/progs/trivial/tristrip.c
index 77bf2fad28..29915ff111 100644
--- a/progs/trivial/tristrip.c
+++ b/progs/trivial/tristrip.c
@@ -62,7 +62,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/vbo-drawarrays.c b/progs/trivial/vbo-drawarrays.c
index c29954b903..cb26e84115 100644
--- a/progs/trivial/vbo-drawarrays.c
+++ b/progs/trivial/vbo-drawarrays.c
@@ -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();
diff --git a/progs/trivial/vbo-noninterleaved.c b/progs/trivial/vbo-noninterleaved.c
index 0672ca50ff..f7c42a8981 100644
--- a/progs/trivial/vbo-noninterleaved.c
+++ b/progs/trivial/vbo-noninterleaved.c
@@ -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();
diff --git a/progs/trivial/vbo-tri.c b/progs/trivial/vbo-tri.c
new file mode 100644
index 0000000000..d4cba14414
--- /dev/null
+++ b/progs/trivial/vbo-tri.c
@@ -0,0 +1,131 @@
+/* Even simpler for many drivers than trivial/tri -- pass-through
+ * vertex shader and vertex data in a VBO.
+ */
+
+#include <assert.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <GL/glew.h>
+#include <GL/glut.h>
+
+
+struct {
+ GLfloat pos[4];
+ GLfloat color[4];
+} verts[] =
+{
+ { { -0.9, -0.9, 0.0, 1.0 },
+ {.8,0,0, 1},
+ },
+
+ { { 0.9, -0.9, 0.0, 1.0 },
+ { 0, .9, 0, 1 },
+ },
+
+ { { 0, 0.9, 0.0, 1.0 },
+ {0,0,.7, 1},
+ },
+};
+
+GLuint arrayObj;
+
+static void Init( void )
+{
+ GLint errno;
+ GLuint prognum;
+
+ static const char *prog1 =
+ "!!ARBvp1.0\n"
+ "MOV result.color, vertex.color;\n"
+ "MOV result.position, vertex.position;\n"
+ "END\n";
+
+
+ glGenProgramsARB(1, &prognum);
+
+ glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prognum);
+ glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
+ strlen(prog1), (const GLubyte *) prog1);
+
+ assert(glIsProgramARB(prognum));
+ errno = glGetError();
+ printf("glGetError = %d\n", errno);
+ if (errno != GL_NO_ERROR)
+ {
+ GLint errorpos;
+
+ glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errorpos);
+ printf("errorpos: %d\n", errorpos);
+ printf("%s\n", (char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB));
+ }
+
+
+ glEnableClientState( GL_VERTEX_ARRAY );
+ glEnableClientState( GL_COLOR_ARRAY );
+
+ glGenBuffersARB(1, &arrayObj);
+ glBindBufferARB(GL_ARRAY_BUFFER_ARB, arrayObj);
+ glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), verts, GL_STATIC_DRAW_ARB);
+
+ glVertexPointer( 4, GL_FLOAT, sizeof(verts[0]), 0 );
+ glColorPointer( 4, GL_FLOAT, sizeof(verts[0]), (void *)(4*sizeof(float)) );
+}
+
+
+
+static void Display( void )
+{
+ glClearColor(0.3, 0.3, 0.3, 1);
+ glClear( GL_COLOR_BUFFER_BIT );
+
+ glEnable(GL_VERTEX_PROGRAM_NV);
+ glDrawArrays( GL_TRIANGLES, 0, 3 );
+
+ glutSwapBuffers();
+}
+
+
+static void Reshape( int width, int height )
+{
+ glViewport( 0, 0, width, height );
+ glMatrixMode( GL_PROJECTION );
+ glLoadIdentity();
+ glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0);
+ glMatrixMode( GL_MODELVIEW );
+ glLoadIdentity();
+ /*glTranslatef( 0.0, 0.0, -15.0 );*/
+}
+
+
+static void Key( unsigned char key, int x, int y )
+{
+ (void) x;
+ (void) y;
+ switch (key) {
+ case 27:
+ exit(0);
+ break;
+ }
+ glutPostRedisplay();
+}
+
+
+
+
+int main( int argc, char *argv[] )
+{
+ glutInit( &argc, argv );
+ glutInitWindowPosition( 0, 0 );
+ glutInitWindowSize( 250, 250 );
+ glutInitDisplayMode( GLUT_RGB | GLUT_DOUBLE );
+ glutCreateWindow(argv[0]);
+ glewInit();
+ glutReshapeFunc( Reshape );
+ glutKeyboardFunc( Key );
+ glutDisplayFunc( Display );
+ Init();
+ glutMainLoop();
+ return 0;
+}
diff --git a/progs/trivial/vp-tri-cb-pos.c b/progs/trivial/vp-tri-cb-pos.c
index 42bf9806b1..9cbc4d1193 100644
--- a/progs/trivial/vp-tri-cb-pos.c
+++ b/progs/trivial/vp-tri-cb-pos.c
@@ -81,7 +81,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/vp-tri-cb-tex.c b/progs/trivial/vp-tri-cb-tex.c
index 8290226675..e543e2ec3f 100644
--- a/progs/trivial/vp-tri-cb-tex.c
+++ b/progs/trivial/vp-tri-cb-tex.c
@@ -114,7 +114,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();
diff --git a/progs/trivial/vp-tri-invariant.c b/progs/trivial/vp-tri-invariant.c
index ff24139365..4dbe95eb9a 100644
--- a/progs/trivial/vp-tri-invariant.c
+++ b/progs/trivial/vp-tri-invariant.c
@@ -69,7 +69,7 @@ static void Key(unsigned char key, int x, int y)
case 27:
exit(1);
default:
- return;
+ break;
}
glutPostRedisplay();