summaryrefslogtreecommitdiff
path: root/progs
diff options
context:
space:
mode:
Diffstat (limited to 'progs')
-rw-r--r--progs/fp/fp-tri.c6
-rw-r--r--progs/fp/kil-pos.txt (renamed from progs/fp/kill-pos.txt)0
-rw-r--r--progs/fp/kil-texcoord-sgt.txt8
-rw-r--r--progs/glsl/.gitignore1
-rw-r--r--progs/glsl/Makefile7
-rw-r--r--progs/glsl/linktest.c258
-rw-r--r--progs/tests/.gitignore5
-rw-r--r--progs/tests/SConscript1
-rw-r--r--progs/tests/texcompress2.c1
-rw-r--r--progs/trivial/.gitignore1
-rw-r--r--progs/trivial/Makefile1
-rw-r--r--progs/trivial/SConscript1
-rw-r--r--progs/trivial/clear-fbo-tex.c1
-rw-r--r--progs/trivial/clear-fbo.c1
-rw-r--r--progs/trivial/clear-random.c1
-rw-r--r--progs/trivial/clear-repeat.c1
-rw-r--r--progs/trivial/clear-scissor.c1
-rw-r--r--progs/trivial/clear-undefined.c1
-rw-r--r--progs/trivial/clear.c1
-rw-r--r--progs/trivial/createwin.c1
-rw-r--r--progs/trivial/dlist-dangling.c1
-rw-r--r--progs/trivial/dlist-edgeflag-dangling.c1
-rw-r--r--progs/trivial/dlist-edgeflag.c1
-rw-r--r--progs/trivial/line-clip.c1
-rw-r--r--progs/trivial/line-cull.c1
-rw-r--r--progs/trivial/line-smooth.c2
-rw-r--r--progs/trivial/line-stipple-wide.c1
-rw-r--r--progs/trivial/line-userclip-clip.c1
-rw-r--r--progs/trivial/line-userclip-nop-clip.c1
-rw-r--r--progs/trivial/line-userclip-nop.c1
-rw-r--r--progs/trivial/line-userclip.c1
-rw-r--r--progs/trivial/line-wide.c1
-rw-r--r--progs/trivial/line.c1
-rw-r--r--progs/trivial/lineloop-clip.c1
-rw-r--r--progs/trivial/lineloop.c1
-rw-r--r--progs/trivial/linestrip-clip.c1
-rw-r--r--progs/trivial/linestrip-flat-stipple.c1
-rw-r--r--progs/trivial/linestrip-stipple-wide.c1
-rw-r--r--progs/trivial/linestrip-stipple.c1
-rw-r--r--progs/trivial/linestrip.c1
-rw-r--r--progs/trivial/long-fixed-func.c1
-rw-r--r--progs/trivial/point-clip.c1
-rw-r--r--progs/trivial/point-param.c1
-rw-r--r--progs/trivial/point-sprite.c1
-rw-r--r--progs/trivial/point-wide-smooth.c1
-rw-r--r--progs/trivial/point-wide.c1
-rw-r--r--progs/trivial/point.c1
-rw-r--r--progs/trivial/poly-flat-clip.c1
-rw-r--r--progs/trivial/poly-flat-unfilled-clip.c1
-rw-r--r--progs/trivial/poly-flat.c1
-rw-r--r--progs/trivial/poly-unfilled.c1
-rw-r--r--progs/trivial/poly.c1
-rw-r--r--progs/trivial/quad-clip-all-vertices.c1
-rw-r--r--progs/trivial/quad-clip-nearplane.c1
-rw-r--r--progs/trivial/quad-clip.c1
-rw-r--r--progs/trivial/quad-degenerate.c1
-rw-r--r--progs/trivial/quad-flat.c1
-rw-r--r--progs/trivial/quad-offset-factor.c1
-rw-r--r--progs/trivial/quad-offset-unfilled.c1
-rw-r--r--progs/trivial/quad-offset-units.c1
-rw-r--r--progs/trivial/quad-tex-2d.c1
-rw-r--r--progs/trivial/quad-tex-3d.c1
-rw-r--r--progs/trivial/quad-tex-alpha.c1
-rw-r--r--progs/trivial/quad-tex-pbo.c1
-rw-r--r--progs/trivial/quad-tex-sub.c1
-rw-r--r--progs/trivial/quad-unfilled-clip.c1
-rw-r--r--progs/trivial/quad-unfilled-stipple.c1
-rw-r--r--progs/trivial/quad-unfilled.c1
-rw-r--r--progs/trivial/quad.c1
-rw-r--r--progs/trivial/quads.c1
-rw-r--r--progs/trivial/quadstrip-clip.c1
-rw-r--r--progs/trivial/quadstrip-cont.c1
-rw-r--r--progs/trivial/quadstrip-flat.c1
-rw-r--r--progs/trivial/quadstrip.c1
-rw-r--r--progs/trivial/readpixels.c1
-rw-r--r--progs/trivial/tri-alpha-tex.c1
-rw-r--r--progs/trivial/tri-alpha.c1
-rw-r--r--progs/trivial/tri-blend-color.c1
-rw-r--r--progs/trivial/tri-clear.c1
-rw-r--r--progs/trivial/tri-clip.c1
-rw-r--r--progs/trivial/tri-cull-both.c1
-rw-r--r--progs/trivial/tri-cull.c1
-rw-r--r--progs/trivial/tri-dlist.c1
-rw-r--r--progs/trivial/tri-edgeflag.c1
-rw-r--r--progs/trivial/tri-fbo.c1
-rw-r--r--progs/trivial/tri-flat-clip.c1
-rw-r--r--progs/trivial/tri-flat.c1
-rw-r--r--progs/trivial/tri-fog.c1
-rw-r--r--progs/trivial/tri-fp-const-imm.c1
-rw-r--r--progs/trivial/tri-fp.c1
-rw-r--r--progs/trivial/tri-lit.c1
-rw-r--r--progs/trivial/tri-logicop-none.c1
-rw-r--r--progs/trivial/tri-logicop-xor.c1
-rw-r--r--progs/trivial/tri-mask-tri.c1
-rw-r--r--progs/trivial/tri-multitex-vbo.c261
-rw-r--r--progs/trivial/tri-orig.c1
-rw-r--r--progs/trivial/tri-query.c1
-rw-r--r--progs/trivial/tri-repeat.c1
-rw-r--r--progs/trivial/tri-scissor-tri.c1
-rw-r--r--progs/trivial/tri-square.c1
-rw-r--r--progs/trivial/tri-stipple.c1
-rw-r--r--progs/trivial/tri-tex-3d.c1
-rw-r--r--progs/trivial/tri-tex.c1
-rw-r--r--progs/trivial/tri-tri.c1
-rw-r--r--progs/trivial/tri-unfilled-clip.c1
-rw-r--r--progs/trivial/tri-unfilled-edgeflag.c1
-rw-r--r--progs/trivial/tri-unfilled-fog.c1
-rw-r--r--progs/trivial/tri-unfilled-point.c1
-rw-r--r--progs/trivial/tri-unfilled-smooth.c1
-rw-r--r--progs/trivial/tri-unfilled-tri-lit.c1
-rw-r--r--progs/trivial/tri-unfilled-tri.c1
-rw-r--r--progs/trivial/tri-unfilled-userclip-stip.c1
-rw-r--r--progs/trivial/tri-unfilled-userclip.c1
-rw-r--r--progs/trivial/tri-unfilled.c1
-rw-r--r--progs/trivial/tri-userclip.c1
-rw-r--r--progs/trivial/tri-viewport.c1
-rw-r--r--progs/trivial/tri-z-9.c1
-rw-r--r--progs/trivial/tri-z-eq.c1
-rw-r--r--progs/trivial/tri.c1
-rw-r--r--progs/trivial/trifan-flat-clip.c1
-rw-r--r--progs/trivial/trifan-flat-unfilled-clip.c1
-rw-r--r--progs/trivial/trifan-flat.c1
-rw-r--r--progs/trivial/trifan-unfilled.c1
-rw-r--r--progs/trivial/trifan.c1
-rw-r--r--progs/trivial/tristrip-clip.c1
-rw-r--r--progs/trivial/tristrip-flat.c1
-rw-r--r--progs/trivial/tristrip.c1
-rw-r--r--progs/vp/psiz-imm.txt5
-rw-r--r--progs/vp/psiz-mul-clamp.txt9
-rw-r--r--progs/vp/psiz-param-clamp.txt10
-rw-r--r--progs/vpglsl/SConscript13
-rw-r--r--progs/xdemos/Makefile2
132 files changed, 703 insertions, 2 deletions
diff --git a/progs/fp/fp-tri.c b/progs/fp/fp-tri.c
index bc490c0520..6c15540d38 100644
--- a/progs/fp/fp-tri.c
+++ b/progs/fp/fp-tri.c
@@ -210,11 +210,17 @@ static void Display(void)
glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 0, 1.0, 1.0, 0.0, 0.0);
glProgramLocalParameter4fARB(GL_FRAGMENT_PROGRAM_ARB, 1, 0.0, 0.0, 1.0, 1.0);
glBegin(GL_TRIANGLES);
+
glColor3f(0,0,1);
+ glTexCoord3f(1,1,0);
glVertex3f( 0.9, -0.9, -30.0);
+
glColor3f(1,0,0);
+ glTexCoord3f(1,-1,0);
glVertex3f( 0.9, 0.9, -30.0);
+
glColor3f(0,1,0);
+ glTexCoord3f(-1,0,0);
glVertex3f(-0.9, 0.0, -30.0);
glEnd();
diff --git a/progs/fp/kill-pos.txt b/progs/fp/kil-pos.txt
index 5ff4f6f2c8..5ff4f6f2c8 100644
--- a/progs/fp/kill-pos.txt
+++ b/progs/fp/kil-pos.txt
diff --git a/progs/fp/kil-texcoord-sgt.txt b/progs/fp/kil-texcoord-sgt.txt
new file mode 100644
index 0000000000..c74fd10dac
--- /dev/null
+++ b/progs/fp/kil-texcoord-sgt.txt
@@ -0,0 +1,8 @@
+!!ARBfp1.0
+TEMP R0;
+MUL R0.xy, fragment.texcoord[0], fragment.texcoord[0];
+ADD R0.x, R0.x, R0.y;
+SGE R0.y, R0.x, fragment.texcoord[0].w;
+KIL -R0.y;
+MOV result.color, fragment.color;
+END
diff --git a/progs/glsl/.gitignore b/progs/glsl/.gitignore
index 5fdb4ef16d..d3e31163d8 100644
--- a/progs/glsl/.gitignore
+++ b/progs/glsl/.gitignore
@@ -6,6 +6,7 @@ deriv
extfuncs.h
fragcoord
identity
+linktest
mandelbrot
multinoise
multitex
diff --git a/progs/glsl/Makefile b/progs/glsl/Makefile
index 8061277033..0f1a299570 100644
--- a/progs/glsl/Makefile
+++ b/progs/glsl/Makefile
@@ -17,6 +17,7 @@ PROGS = \
deriv \
identity \
fragcoord \
+ linktest \
mandelbrot \
multinoise \
multitex \
@@ -128,6 +129,12 @@ fragcoord: fragcoord.o shaderutil.o
$(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) fragcoord.o shaderutil.o $(LIBS) -o $@
+linktest.o: linktest.c extfuncs.h shaderutil.h
+ $(APP_CC) -c -I$(INCDIR) $(CFLAGS) linktest.c
+
+linktest: linktest.o shaderutil.o
+ $(APP_CC) -I$(INCDIR) $(CFLAGS) $(LDFLAGS) linktest.o shaderutil.o $(LIBS) -o $@
+
mandelbrot.o: mandelbrot.c extfuncs.h shaderutil.h
$(APP_CC) -c -I$(INCDIR) $(CFLAGS) mandelbrot.c
diff --git a/progs/glsl/linktest.c b/progs/glsl/linktest.c
new file mode 100644
index 0000000000..601b24e893
--- /dev/null
+++ b/progs/glsl/linktest.c
@@ -0,0 +1,258 @@
+/**
+ * Test linking of multiple compilation units.
+ * Brian Paul
+ * 28 March 2009
+ */
+
+#include <assert.h>
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <GL/gl.h>
+#include <GL/glut.h>
+#include <GL/glext.h>
+#include "extfuncs.h"
+#include "shaderutil.h"
+
+
+static GLfloat diffuse[4] = { 0.5f, 1.0f, 0.5f, 1.0f };
+static GLfloat specular[4] = { 0.8f, 0.8f, 0.8f, 1.0f };
+static GLfloat lightPos[4] = { 0.0f, 10.0f, 20.0f, 0.0f };
+static GLfloat delta = 1.0f;
+
+static GLuint VertShader1;
+static GLuint VertShader2;
+static GLuint FragShader1;
+static GLuint FragShader2;
+static GLuint Program;
+
+static GLint uDiffuse;
+static GLint uSpecular;
+static GLint uTexture;
+
+static GLint Win = 0;
+static GLboolean anim = GL_TRUE;
+
+
+
+static const char *FragShaderSource1 =
+ "float compute_dotprod(const vec3 normal) \n"
+ "{ \n"
+ " float dotProd = max(dot(gl_LightSource[0].position.xyz, \n"
+ " normalize(normal)), 0.0); \n"
+ " return dotProd; \n"
+ "} \n";
+
+static const char *FragShaderSource2 =
+ "uniform vec4 diffuse;\n"
+ "uniform vec4 specular;\n"
+ "varying vec3 normal;\n"
+ "\n"
+ "// external function \n"
+ "float compute_dotprod(const vec3 normal); \n"
+ "\n"
+ "void main() \n"
+ "{ \n"
+ " float dotProd = compute_dotprod(normal); \n"
+ " gl_FragColor = diffuse * dotProd + specular * pow(dotProd, 20.0); \n"
+ "} \n";
+
+
+static const char *VertShaderSource1 =
+ "vec3 compute_normal() \n"
+ "{ \n"
+ " return gl_NormalMatrix * gl_Normal; \n"
+ "} \n";
+
+static const char *VertShaderSource2 =
+ "varying vec3 normal;\n"
+ "\n"
+ "// external function \n"
+ "vec3 compute_normal(); \n"
+ "\n"
+ "void main() \n"
+ "{ \n"
+ " gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; \n"
+ " normal = compute_normal(); \n"
+ "} \n";
+
+
+static void
+normalize(GLfloat *dst, const GLfloat *src)
+{
+ GLfloat len = sqrt(src[0] * src[0] + src[1] * src[1] + src[2] * src[2]);
+ dst[0] = src[0] / len;
+ dst[1] = src[1] / len;
+ dst[2] = src[2] / len;
+ dst[3] = src[3];
+}
+
+
+static void
+Redisplay(void)
+{
+ GLfloat vec[4];
+
+ glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+
+ /* update light position */
+ normalize(vec, lightPos);
+ glLightfv(GL_LIGHT0, GL_POSITION, vec);
+
+ glutSolidSphere(2.0, 10, 5);
+
+ glutSwapBuffers();
+}
+
+
+static void
+Idle(void)
+{
+ lightPos[0] += delta;
+ if (lightPos[0] > 25.0f || lightPos[0] < -25.0f)
+ delta = -delta;
+ glutPostRedisplay();
+}
+
+
+static void
+Reshape(int width, int height)
+{
+ glViewport(0, 0, width, height);
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glFrustum(-1.0, 1.0, -1.0, 1.0, 5.0, 25.0);
+ glMatrixMode(GL_MODELVIEW);
+ glLoadIdentity();
+ glTranslatef(0.0f, 0.0f, -15.0f);
+}
+
+
+static void
+CleanUp(void)
+{
+ glDeleteShader_func(VertShader1);
+ glDeleteShader_func(VertShader2);
+ glDeleteShader_func(FragShader1);
+ glDeleteShader_func(FragShader2);
+ glDeleteProgram_func(Program);
+ glutDestroyWindow(Win);
+}
+
+
+static void
+Key(unsigned char key, int x, int y)
+{
+ (void) x;
+ (void) y;
+
+ switch(key) {
+ case ' ':
+ case 'a':
+ anim = !anim;
+ if (anim)
+ glutIdleFunc(Idle);
+ else
+ glutIdleFunc(NULL);
+ break;
+ case 'x':
+ lightPos[0] -= 1.0f;
+ break;
+ case 'X':
+ lightPos[0] += 1.0f;
+ break;
+ case 27:
+ CleanUp();
+ exit(0);
+ break;
+ }
+ glutPostRedisplay();
+}
+
+
+static void
+CheckLink(GLuint prog)
+{
+ GLint stat;
+ glGetProgramiv_func(prog, GL_LINK_STATUS, &stat);
+ if (!stat) {
+ GLchar log[1000];
+ GLsizei len;
+ glGetProgramInfoLog_func(prog, 1000, &len, log);
+ fprintf(stderr, "Linker error:\n%s\n", log);
+ }
+}
+
+
+static void
+Init(void)
+{
+ if (!ShadersSupported())
+ exit(1);
+
+ GetExtensionFuncs();
+
+ printf("GL_RENDERER = %s\n",(const char *) glGetString(GL_RENDERER));
+
+ VertShader1 = CompileShaderText(GL_VERTEX_SHADER, VertShaderSource1);
+ VertShader2 = CompileShaderText(GL_VERTEX_SHADER, VertShaderSource2);
+ FragShader1 = CompileShaderText(GL_FRAGMENT_SHADER, FragShaderSource1);
+ FragShader2 = CompileShaderText(GL_FRAGMENT_SHADER, FragShaderSource2);
+
+ Program = glCreateProgram_func();
+ glAttachShader_func(Program, VertShader1);
+ glAttachShader_func(Program, VertShader2);
+ glAttachShader_func(Program, FragShader1);
+ glAttachShader_func(Program, FragShader2);
+
+ glLinkProgram_func(Program);
+
+ CheckLink(Program);
+
+ glUseProgram_func(Program);
+
+ uDiffuse = glGetUniformLocation_func(Program, "diffuse");
+ uSpecular = glGetUniformLocation_func(Program, "specular");
+ uTexture = glGetUniformLocation_func(Program, "texture");
+ printf("DiffusePos %d SpecularPos %d TexturePos %d\n",
+ uDiffuse, uSpecular, uTexture);
+
+ glUniform4fv_func(uDiffuse, 1, diffuse);
+ glUniform4fv_func(uSpecular, 1, specular);
+
+ glClearColor(0.3f, 0.3f, 0.3f, 0.0f);
+ glEnable(GL_DEPTH_TEST);
+
+ glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, diffuse);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular);
+ glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, 10.0f);
+
+ assert(glIsProgram_func(Program));
+ assert(glIsShader_func(VertShader1));
+ assert(glIsShader_func(VertShader2));
+ assert(glIsShader_func(FragShader1));
+ assert(glIsShader_func(FragShader2));
+
+ glColor3f(1, 0, 0);
+}
+
+
+int
+main(int argc, char *argv[])
+{
+ glutInit(&argc, argv);
+ glutInitWindowPosition( 0, 0);
+ glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
+ Win = glutCreateWindow(argv[0]);
+ glutReshapeFunc(Reshape);
+ glutKeyboardFunc(Key);
+ glutDisplayFunc(Redisplay);
+ if (anim)
+ glutIdleFunc(Idle);
+ Init();
+ glutMainLoop();
+ return 0;
+}
+
+
diff --git a/progs/tests/.gitignore b/progs/tests/.gitignore
index 0ed3a885c2..e6369de3ab 100644
--- a/progs/tests/.gitignore
+++ b/progs/tests/.gitignore
@@ -45,7 +45,10 @@ invert
jkrahntest
lineclip
manytex
+mapbufrange
+mapvbo
minmag
+mipgen
mipmap_limits
mipmap_view
multipal
@@ -54,10 +57,12 @@ packedpixels
pbo
prog_parameter
projtex
+quads
random
readrate
readtex.c
readtex.h
+rubberband
seccolor
sharedtex
shader_api
diff --git a/progs/tests/SConscript b/progs/tests/SConscript
index cfeb9d1c37..bf1e7f8a7d 100644
--- a/progs/tests/SConscript
+++ b/progs/tests/SConscript
@@ -105,6 +105,7 @@ progs = [
'subtexrate',
'tex1d',
'texcmp',
+ 'texcompress2',
'texfilt',
'texgenmix',
'texline',
diff --git a/progs/tests/texcompress2.c b/progs/tests/texcompress2.c
index 3e8e9908cb..cbb8f1d3a2 100644
--- a/progs/tests/texcompress2.c
+++ b/progs/tests/texcompress2.c
@@ -7,7 +7,6 @@
#include <stdio.h>
#include <GL/glew.h>
#include <GL/glut.h>
-#include <GL/glx.h>
#include "readtex.c"
#define IMAGE_FILE "../images/arch.rgb"
diff --git a/progs/trivial/.gitignore b/progs/trivial/.gitignore
index aec4c94527..8dcb20a68f 100644
--- a/progs/trivial/.gitignore
+++ b/progs/trivial/.gitignore
@@ -96,6 +96,7 @@ tri-lit
tri-logicop-none
tri-logicop-xor
tri-mask-tri
+tri-multitex-vbo
tri-orig
tri-query
tri-repeat
diff --git a/progs/trivial/Makefile b/progs/trivial/Makefile
index 082387d86e..69c71cbaf6 100644
--- a/progs/trivial/Makefile
+++ b/progs/trivial/Makefile
@@ -111,6 +111,7 @@ SOURCES = \
tri-scissor-tri.c \
tri-stencil.c \
tri-stipple.c \
+ tri-multitex-vbo.c \
tri-tex.c \
tri-tex-3d.c \
tri-tri.c \
diff --git a/progs/trivial/SConscript b/progs/trivial/SConscript
index 6a9ffafe50..480630e210 100644
--- a/progs/trivial/SConscript
+++ b/progs/trivial/SConscript
@@ -107,6 +107,7 @@ progs = [
'tri-scissor-tri',
'tri-stencil',
'tri-stipple',
+ 'tri-multitex-vbo',
'tri-tex',
'tri-tex-3d',
'tri-tri',
diff --git a/progs/trivial/clear-fbo-tex.c b/progs/trivial/clear-fbo-tex.c
index eccfde5ae6..a206676e48 100644
--- a/progs/trivial/clear-fbo-tex.c
+++ b/progs/trivial/clear-fbo-tex.c
@@ -27,6 +27,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
diff --git a/progs/trivial/clear-fbo.c b/progs/trivial/clear-fbo.c
index 64b25430c6..0aeb45489f 100644
--- a/progs/trivial/clear-fbo.c
+++ b/progs/trivial/clear-fbo.c
@@ -23,6 +23,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
diff --git a/progs/trivial/clear-random.c b/progs/trivial/clear-random.c
index f3a67dbe8a..e3da23a8f5 100644
--- a/progs/trivial/clear-random.c
+++ b/progs/trivial/clear-random.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
}
diff --git a/progs/trivial/clear-repeat.c b/progs/trivial/clear-repeat.c
index 9c618d492f..f966adb080 100644
--- a/progs/trivial/clear-repeat.c
+++ b/progs/trivial/clear-repeat.c
@@ -38,6 +38,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.3, 0.1, 0.3, 0.0);
}
diff --git a/progs/trivial/clear-scissor.c b/progs/trivial/clear-scissor.c
index 5e2025bed7..0173532748 100644
--- a/progs/trivial/clear-scissor.c
+++ b/progs/trivial/clear-scissor.c
@@ -16,6 +16,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
}
static void Reshape(int width, int height)
diff --git a/progs/trivial/clear-undefined.c b/progs/trivial/clear-undefined.c
index ce066bf8e6..5ec33bf3d7 100644
--- a/progs/trivial/clear-undefined.c
+++ b/progs/trivial/clear-undefined.c
@@ -17,6 +17,7 @@ static void Init(void)
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
fprintf(stderr, "Top right corner should be red\n");
+ fflush(stderr);
}
static void Reshape(int width, int height)
diff --git a/progs/trivial/clear.c b/progs/trivial/clear.c
index 37cfd54fbe..03857b4b89 100644
--- a/progs/trivial/clear.c
+++ b/progs/trivial/clear.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/createwin.c b/progs/trivial/createwin.c
index 44d5b1b2c5..f2cc6f1cff 100644
--- a/progs/trivial/createwin.c
+++ b/progs/trivial/createwin.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/dlist-dangling.c b/progs/trivial/dlist-dangling.c
index 64054ec96c..de10628009 100644
--- a/progs/trivial/dlist-dangling.c
+++ b/progs/trivial/dlist-dangling.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/dlist-edgeflag-dangling.c b/progs/trivial/dlist-edgeflag-dangling.c
index 1b66244cab..3d3aaeb694 100644
--- a/progs/trivial/dlist-edgeflag-dangling.c
+++ b/progs/trivial/dlist-edgeflag-dangling.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/dlist-edgeflag.c b/progs/trivial/dlist-edgeflag.c
index 350100681e..8002129ed1 100644
--- a/progs/trivial/dlist-edgeflag.c
+++ b/progs/trivial/dlist-edgeflag.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/line-clip.c b/progs/trivial/line-clip.c
index bcee32e25f..5276baffd5 100644
--- a/progs/trivial/line-clip.c
+++ b/progs/trivial/line-clip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/line-cull.c b/progs/trivial/line-cull.c
index 9821873130..1e1b77a942 100644
--- a/progs/trivial/line-cull.c
+++ b/progs/trivial/line-cull.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/line-smooth.c b/progs/trivial/line-smooth.c
index f030de9b9f..9c4b9a0115 100644
--- a/progs/trivial/line-smooth.c
+++ b/progs/trivial/line-smooth.c
@@ -44,10 +44,12 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glGetFloatv(GL_LINE_WIDTH_RANGE, aarange);
glGetFloatv(GL_ALIASED_LINE_WIDTH_RANGE, range);
printf("Non-AA line width range: %f .. %f\n", range[0], range[1]);
printf("AA line width range: %f .. %f\n", aarange[0], aarange[1]);
+ fflush(stdout);
}
diff --git a/progs/trivial/line-stipple-wide.c b/progs/trivial/line-stipple-wide.c
index 28d96c797b..1804ffad3f 100644
--- a/progs/trivial/line-stipple-wide.c
+++ b/progs/trivial/line-stipple-wide.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/line-userclip-clip.c b/progs/trivial/line-userclip-clip.c
index 1b9f059729..8e030b47ce 100644
--- a/progs/trivial/line-userclip-clip.c
+++ b/progs/trivial/line-userclip-clip.c
@@ -41,6 +41,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
glClipPlane(GL_CLIP_PLANE0, plane);
diff --git a/progs/trivial/line-userclip-nop-clip.c b/progs/trivial/line-userclip-nop-clip.c
index 9f144a6e9a..6fcd4bcfe7 100644
--- a/progs/trivial/line-userclip-nop-clip.c
+++ b/progs/trivial/line-userclip-nop-clip.c
@@ -41,6 +41,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
glClipPlane(GL_CLIP_PLANE0, plane);
diff --git a/progs/trivial/line-userclip-nop.c b/progs/trivial/line-userclip-nop.c
index 7588faeb98..e59fd133a5 100644
--- a/progs/trivial/line-userclip-nop.c
+++ b/progs/trivial/line-userclip-nop.c
@@ -41,6 +41,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
glClipPlane(GL_CLIP_PLANE0, plane);
diff --git a/progs/trivial/line-userclip.c b/progs/trivial/line-userclip.c
index 77d8228188..e30be5580b 100644
--- a/progs/trivial/line-userclip.c
+++ b/progs/trivial/line-userclip.c
@@ -41,6 +41,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
glClipPlane(GL_CLIP_PLANE0, plane);
diff --git a/progs/trivial/line-wide.c b/progs/trivial/line-wide.c
index f20505378c..b74021dea7 100644
--- a/progs/trivial/line-wide.c
+++ b/progs/trivial/line-wide.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/line.c b/progs/trivial/line.c
index 7ccbce3750..e1d73280bf 100644
--- a/progs/trivial/line.c
+++ b/progs/trivial/line.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/lineloop-clip.c b/progs/trivial/lineloop-clip.c
index fbeca985b9..45fa47491f 100644
--- a/progs/trivial/lineloop-clip.c
+++ b/progs/trivial/lineloop-clip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/lineloop.c b/progs/trivial/lineloop.c
index 5863df654b..c290dbd8cb 100644
--- a/progs/trivial/lineloop.c
+++ b/progs/trivial/lineloop.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/linestrip-clip.c b/progs/trivial/linestrip-clip.c
index dae27c31d4..f252822921 100644
--- a/progs/trivial/linestrip-clip.c
+++ b/progs/trivial/linestrip-clip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/linestrip-flat-stipple.c b/progs/trivial/linestrip-flat-stipple.c
index ee79f15019..5caa724423 100644
--- a/progs/trivial/linestrip-flat-stipple.c
+++ b/progs/trivial/linestrip-flat-stipple.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/linestrip-stipple-wide.c b/progs/trivial/linestrip-stipple-wide.c
index c6307d5994..701c82c266 100644
--- a/progs/trivial/linestrip-stipple-wide.c
+++ b/progs/trivial/linestrip-stipple-wide.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/linestrip-stipple.c b/progs/trivial/linestrip-stipple.c
index 2b40b5f1b8..df2eef96b5 100644
--- a/progs/trivial/linestrip-stipple.c
+++ b/progs/trivial/linestrip-stipple.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/linestrip.c b/progs/trivial/linestrip.c
index 865a752796..0219b1ab70 100644
--- a/progs/trivial/linestrip.c
+++ b/progs/trivial/linestrip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/long-fixed-func.c b/progs/trivial/long-fixed-func.c
index f2a29a9d37..4b6c412f9e 100644
--- a/progs/trivial/long-fixed-func.c
+++ b/progs/trivial/long-fixed-func.c
@@ -53,6 +53,7 @@ Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.3, 0.1, 0.3, 0.0);
diff --git a/progs/trivial/point-clip.c b/progs/trivial/point-clip.c
index 6aaee0d1a5..4c89ba598d 100644
--- a/progs/trivial/point-clip.c
+++ b/progs/trivial/point-clip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/point-param.c b/progs/trivial/point-param.c
index 1edeec3468..6f43720a89 100644
--- a/progs/trivial/point-param.c
+++ b/progs/trivial/point-param.c
@@ -38,6 +38,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/point-sprite.c b/progs/trivial/point-sprite.c
index 2f8226ee27..5d29a6a3cf 100644
--- a/progs/trivial/point-sprite.c
+++ b/progs/trivial/point-sprite.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
#define SIZE 16
diff --git a/progs/trivial/point-wide-smooth.c b/progs/trivial/point-wide-smooth.c
index 63f83badf8..f6e9b8df5f 100644
--- a/progs/trivial/point-wide-smooth.c
+++ b/progs/trivial/point-wide-smooth.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/point-wide.c b/progs/trivial/point-wide.c
index 725edae49e..8abd64c6a9 100644
--- a/progs/trivial/point-wide.c
+++ b/progs/trivial/point-wide.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/point.c b/progs/trivial/point.c
index 3c472c1b91..49959dcc48 100644
--- a/progs/trivial/point.c
+++ b/progs/trivial/point.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/poly-flat-clip.c b/progs/trivial/poly-flat-clip.c
index d58a3a358f..5490068b08 100644
--- a/progs/trivial/poly-flat-clip.c
+++ b/progs/trivial/poly-flat-clip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/poly-flat-unfilled-clip.c b/progs/trivial/poly-flat-unfilled-clip.c
index 74249eb499..26b90ef964 100644
--- a/progs/trivial/poly-flat-unfilled-clip.c
+++ b/progs/trivial/poly-flat-unfilled-clip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/poly-flat.c b/progs/trivial/poly-flat.c
index 82098bc1bb..a4e3cdb633 100644
--- a/progs/trivial/poly-flat.c
+++ b/progs/trivial/poly-flat.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/poly-unfilled.c b/progs/trivial/poly-unfilled.c
index 5cc8523f81..2ad443dc15 100644
--- a/progs/trivial/poly-unfilled.c
+++ b/progs/trivial/poly-unfilled.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/poly.c b/progs/trivial/poly.c
index 8944f148d0..e5b788ea5b 100644
--- a/progs/trivial/poly.c
+++ b/progs/trivial/poly.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quad-clip-all-vertices.c b/progs/trivial/quad-clip-all-vertices.c
index 6559adf4af..60c87fc9ce 100644
--- a/progs/trivial/quad-clip-all-vertices.c
+++ b/progs/trivial/quad-clip-all-vertices.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quad-clip-nearplane.c b/progs/trivial/quad-clip-nearplane.c
index 0e4f4c947c..9380e4f9ae 100644
--- a/progs/trivial/quad-clip-nearplane.c
+++ b/progs/trivial/quad-clip-nearplane.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
fprintf(stderr, "Press z/Z to translate quad\n");
diff --git a/progs/trivial/quad-clip.c b/progs/trivial/quad-clip.c
index fd3522a89a..063de6106a 100644
--- a/progs/trivial/quad-clip.c
+++ b/progs/trivial/quad-clip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quad-degenerate.c b/progs/trivial/quad-degenerate.c
index 29fb2774de..fdc142bcd6 100644
--- a/progs/trivial/quad-degenerate.c
+++ b/progs/trivial/quad-degenerate.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quad-flat.c b/progs/trivial/quad-flat.c
index 570eb6bc71..e3147b3b3f 100644
--- a/progs/trivial/quad-flat.c
+++ b/progs/trivial/quad-flat.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quad-offset-factor.c b/progs/trivial/quad-offset-factor.c
index 2c4946a13a..dfe99bbae6 100644
--- a/progs/trivial/quad-offset-factor.c
+++ b/progs/trivial/quad-offset-factor.c
@@ -34,6 +34,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(1.0, 1.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quad-offset-unfilled.c b/progs/trivial/quad-offset-unfilled.c
index 40762825bd..06590021fe 100644
--- a/progs/trivial/quad-offset-unfilled.c
+++ b/progs/trivial/quad-offset-unfilled.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(1.0, 1.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quad-offset-units.c b/progs/trivial/quad-offset-units.c
index b4b138b4b4..922529d977 100644
--- a/progs/trivial/quad-offset-units.c
+++ b/progs/trivial/quad-offset-units.c
@@ -34,6 +34,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(1.0, 1.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quad-tex-2d.c b/progs/trivial/quad-tex-2d.c
index ed6f4a0733..8a886ef578 100644
--- a/progs/trivial/quad-tex-2d.c
+++ b/progs/trivial/quad-tex-2d.c
@@ -38,6 +38,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/quad-tex-3d.c b/progs/trivial/quad-tex-3d.c
index 84acb35fd8..d05131d3b8 100644
--- a/progs/trivial/quad-tex-3d.c
+++ b/progs/trivial/quad-tex-3d.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/quad-tex-alpha.c b/progs/trivial/quad-tex-alpha.c
index be24255a3e..eebaf9170e 100644
--- a/progs/trivial/quad-tex-alpha.c
+++ b/progs/trivial/quad-tex-alpha.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/quad-tex-pbo.c b/progs/trivial/quad-tex-pbo.c
index dcb4ae0e7f..ad41a9a22e 100644
--- a/progs/trivial/quad-tex-pbo.c
+++ b/progs/trivial/quad-tex-pbo.c
@@ -42,6 +42,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/quad-tex-sub.c b/progs/trivial/quad-tex-sub.c
index aabbb9edce..5620dbc6f8 100644
--- a/progs/trivial/quad-tex-sub.c
+++ b/progs/trivial/quad-tex-sub.c
@@ -89,6 +89,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/quad-unfilled-clip.c b/progs/trivial/quad-unfilled-clip.c
index e25a34bda8..761878bd4b 100644
--- a/progs/trivial/quad-unfilled-clip.c
+++ b/progs/trivial/quad-unfilled-clip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quad-unfilled-stipple.c b/progs/trivial/quad-unfilled-stipple.c
index d33e5918bc..cd7d276928 100644
--- a/progs/trivial/quad-unfilled-stipple.c
+++ b/progs/trivial/quad-unfilled-stipple.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quad-unfilled.c b/progs/trivial/quad-unfilled.c
index b60af3e7f5..d64f17fdf9 100644
--- a/progs/trivial/quad-unfilled.c
+++ b/progs/trivial/quad-unfilled.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quad.c b/progs/trivial/quad.c
index c4773ec7da..d360e309d3 100644
--- a/progs/trivial/quad.c
+++ b/progs/trivial/quad.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quads.c b/progs/trivial/quads.c
index 5bc622144e..fe11fef207 100644
--- a/progs/trivial/quads.c
+++ b/progs/trivial/quads.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quadstrip-clip.c b/progs/trivial/quadstrip-clip.c
index 82a6d4e076..4cea81a45d 100644
--- a/progs/trivial/quadstrip-clip.c
+++ b/progs/trivial/quadstrip-clip.c
@@ -34,6 +34,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quadstrip-cont.c b/progs/trivial/quadstrip-cont.c
index 62208dfae7..329523531a 100644
--- a/progs/trivial/quadstrip-cont.c
+++ b/progs/trivial/quadstrip-cont.c
@@ -34,6 +34,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quadstrip-flat.c b/progs/trivial/quadstrip-flat.c
index 9011ee0873..228c6c255e 100644
--- a/progs/trivial/quadstrip-flat.c
+++ b/progs/trivial/quadstrip-flat.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/quadstrip.c b/progs/trivial/quadstrip.c
index 6923afc04b..d49a9a5302 100644
--- a/progs/trivial/quadstrip.c
+++ b/progs/trivial/quadstrip.c
@@ -34,6 +34,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/readpixels.c b/progs/trivial/readpixels.c
index 88aac2684a..5671618446 100644
--- a/progs/trivial/readpixels.c
+++ b/progs/trivial/readpixels.c
@@ -17,6 +17,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.3, 0.1, 0.3, 0.0);
}
diff --git a/progs/trivial/tri-alpha-tex.c b/progs/trivial/tri-alpha-tex.c
index 382d7b2102..780ebe6be5 100644
--- a/progs/trivial/tri-alpha-tex.c
+++ b/progs/trivial/tri-alpha-tex.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/tri-alpha.c b/progs/trivial/tri-alpha.c
index 1a653713bb..aec1cbb377 100644
--- a/progs/trivial/tri-alpha.c
+++ b/progs/trivial/tri-alpha.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-blend-color.c b/progs/trivial/tri-blend-color.c
index db831e3d6e..92f019259e 100644
--- a/progs/trivial/tri-blend-color.c
+++ b/progs/trivial/tri-blend-color.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
}
diff --git a/progs/trivial/tri-clear.c b/progs/trivial/tri-clear.c
index a3908e38e9..f49186bd8a 100644
--- a/progs/trivial/tri-clear.c
+++ b/progs/trivial/tri-clear.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-clip.c b/progs/trivial/tri-clip.c
index 0d31086c85..e1deca1bdc 100644
--- a/progs/trivial/tri-clip.c
+++ b/progs/trivial/tri-clip.c
@@ -37,6 +37,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-cull-both.c b/progs/trivial/tri-cull-both.c
index 73c5583cfd..864be710c2 100644
--- a/progs/trivial/tri-cull-both.c
+++ b/progs/trivial/tri-cull-both.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
glCullFace(GL_FRONT_AND_BACK);
diff --git a/progs/trivial/tri-cull.c b/progs/trivial/tri-cull.c
index c6bcf444e4..c71ad9a031 100644
--- a/progs/trivial/tri-cull.c
+++ b/progs/trivial/tri-cull.c
@@ -60,6 +60,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
cull();
}
diff --git a/progs/trivial/tri-dlist.c b/progs/trivial/tri-dlist.c
index 1c0e320f61..c410be221a 100644
--- a/progs/trivial/tri-dlist.c
+++ b/progs/trivial/tri-dlist.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/tri-edgeflag.c b/progs/trivial/tri-edgeflag.c
index e1278dd649..4c8736ad8c 100644
--- a/progs/trivial/tri-edgeflag.c
+++ b/progs/trivial/tri-edgeflag.c
@@ -35,6 +35,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
}
static void Reshape(int width, int height)
diff --git a/progs/trivial/tri-fbo.c b/progs/trivial/tri-fbo.c
index 7a38f2124c..1ed177ffdf 100644
--- a/progs/trivial/tri-fbo.c
+++ b/progs/trivial/tri-fbo.c
@@ -23,6 +23,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
if (!glutExtensionSupported("GL_EXT_framebuffer_object")) {
diff --git a/progs/trivial/tri-flat-clip.c b/progs/trivial/tri-flat-clip.c
index 3235100385..2aab5ba00a 100644
--- a/progs/trivial/tri-flat-clip.c
+++ b/progs/trivial/tri-flat-clip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.5, 0.5, 0.5, 0.0);
}
diff --git a/progs/trivial/tri-flat.c b/progs/trivial/tri-flat.c
index a7fdaa1f46..ea703ec6f3 100644
--- a/progs/trivial/tri-flat.c
+++ b/progs/trivial/tri-flat.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.5, 0.5, 0.5, 0.0);
}
diff --git a/progs/trivial/tri-fog.c b/progs/trivial/tri-fog.c
index 0099a90ad6..0cea3d3258 100644
--- a/progs/trivial/tri-fog.c
+++ b/progs/trivial/tri-fog.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/tri-fp-const-imm.c b/progs/trivial/tri-fp-const-imm.c
index 2b1499903c..d2df442abf 100644
--- a/progs/trivial/tri-fp-const-imm.c
+++ b/progs/trivial/tri-fp-const-imm.c
@@ -51,6 +51,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
/* Setup the fragment program */
glGenProgramsARB(1, &prognum);
diff --git a/progs/trivial/tri-fp.c b/progs/trivial/tri-fp.c
index b30f9b73e0..4d1508120e 100644
--- a/progs/trivial/tri-fp.c
+++ b/progs/trivial/tri-fp.c
@@ -49,6 +49,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
/* Setup the fragment program */
glGenProgramsARB(1, &prognum);
diff --git a/progs/trivial/tri-lit.c b/progs/trivial/tri-lit.c
index 91fac1a598..15a7ad24c5 100644
--- a/progs/trivial/tri-lit.c
+++ b/progs/trivial/tri-lit.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
diff --git a/progs/trivial/tri-logicop-none.c b/progs/trivial/tri-logicop-none.c
index aba3614bf6..53c2614ac3 100644
--- a/progs/trivial/tri-logicop-none.c
+++ b/progs/trivial/tri-logicop-none.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.3, 0.1, 0.3, 0.0);
}
diff --git a/progs/trivial/tri-logicop-xor.c b/progs/trivial/tri-logicop-xor.c
index e2c94f9bee..f018a851ac 100644
--- a/progs/trivial/tri-logicop-xor.c
+++ b/progs/trivial/tri-logicop-xor.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.3, 0.1, 0.3, 0.0);
}
diff --git a/progs/trivial/tri-mask-tri.c b/progs/trivial/tri-mask-tri.c
index 449125a4db..d62620905d 100644
--- a/progs/trivial/tri-mask-tri.c
+++ b/progs/trivial/tri-mask-tri.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-multitex-vbo.c b/progs/trivial/tri-multitex-vbo.c
new file mode 100644
index 0000000000..e319447ac1
--- /dev/null
+++ b/progs/trivial/tri-multitex-vbo.c
@@ -0,0 +1,261 @@
+/*
+ * Copyright (c) 1991, 1992, 1993 Silicon Graphics, Inc.
+ *
+ * Permission to use, copy, modify, distribute, and sell this software and
+ * its documentation for any purpose is hereby granted without fee, provided
+ * that (i) the above copyright notices and this permission notice appear in
+ * all copies of the software and related documentation, and (ii) the name of
+ * Silicon Graphics may not be used in any advertising or
+ * publicity relating to the software without the specific, prior written
+ * permission of Silicon Graphics.
+ *
+ * THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF
+ * ANY KIND,
+ * EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ * WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+ *
+ * IN NO EVENT SHALL SILICON GRAPHICS BE LIABLE FOR
+ * ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
+ * OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ * WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF
+ * LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
+ * OF THIS SOFTWARE.
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <GL/glew.h>
+#include <GL/glut.h>
+
+#define NR_VERTS 4
+
+struct {
+ GLfloat position[NR_VERTS][4];
+ GLubyte color[NR_VERTS][4];
+ GLfloat tex0[NR_VERTS][2];
+ GLfloat tex1[NR_VERTS][2];
+} verts = {
+
+ { { 0.9, -0.9, 0.0, 1.0 },
+ { 0.9, 0.9, 0.0, 1.0 },
+ { -0.9, 0.9, 0.0, 1.0 },
+ { -0.9, -0.9, 0.0, 1.0 } },
+
+ { { 0x00, 0x00, 0xff, 0x00 },
+ { 0x00, 0xff, 0x00, 0x00 },
+ { 0xff, 0x00, 0x00, 0x00 },
+ { 0xff, 0xff, 0xff, 0x00 }
+ },
+
+ { { 1, -1 },
+ { 1, 1 },
+ { -1, 1 },
+ { -1, -1 } },
+
+ { { 3, 0 },
+ { 0, 3 },
+ { -3, 0 },
+ { 0, -3} },
+
+};
+
+GLuint indices[] = { 0, 1, 2, 3 };
+
+GLuint arrayObj, elementObj;
+
+
+GLenum doubleBuffer;
+
+
+#define Offset(ptr, member) (void *)((const char *)&((ptr)->member) - (const char *)(ptr))
+
+static void Init(void)
+{
+ GLuint texObj[2];
+
+ fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
+ fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
+ fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
+
+ glClearColor(0.0, 0.0, 1.0, 0.0);
+
+ glGenTextures(2, texObj);
+
+#define SIZE 32
+ {
+ GLubyte tex2d[SIZE][SIZE][3];
+ GLint s, t;
+
+ for (s = 0; s < SIZE; s++) {
+ for (t = 0; t < SIZE; t++) {
+ tex2d[t][s][0] = s*255/(SIZE-1);
+ tex2d[t][s][1] = t*255/(SIZE-1);
+ tex2d[t][s][2] = 0;
+ }
+ }
+
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ glActiveTextureARB(GL_TEXTURE0_ARB);
+ glBindTexture(GL_TEXTURE_2D, texObj[0]);
+
+
+ glTexImage2D(GL_TEXTURE_2D, 0, 3, SIZE, SIZE, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, tex2d);
+
+ glEnable(GL_TEXTURE_2D);
+ glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_REPEAT);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
+ }
+
+ {
+ GLubyte tex2d[SIZE][SIZE][3];
+ GLint s, t;
+
+ for (s = 0; s < SIZE; s++) {
+ for (t = 0; t < SIZE; t++) {
+ GLboolean on = ((s/4) ^ (t/4)) & 1;
+ tex2d[t][s][0] = on ? 128 : 0;
+ tex2d[t][s][1] = on ? 128 : 0;
+ tex2d[t][s][2] = on ? 128 : 0;
+ }
+ }
+
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
+ glActiveTextureARB(GL_TEXTURE1_ARB);
+ glBindTexture(GL_TEXTURE_2D, texObj[1]);
+
+ glTexImage2D(GL_TEXTURE_2D, 0, 3, SIZE, SIZE, 0,
+ GL_RGB, GL_UNSIGNED_BYTE, tex2d);
+
+ glEnable(GL_TEXTURE_2D);
+ glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_ADD);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_REPEAT);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+
+ glPixelStorei(GL_UNPACK_ALIGNMENT, 4);
+ }
+
+ glActiveTextureARB( GL_TEXTURE0_ARB );
+
+
+ {
+
+ glGenBuffersARB(1, &arrayObj);
+ glGenBuffersARB(1, &elementObj);
+
+ glBindBufferARB(GL_ARRAY_BUFFER_ARB, arrayObj);
+ glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, elementObj);
+
+ glBufferDataARB(GL_ARRAY_BUFFER_ARB, sizeof(verts), &verts, GL_STATIC_DRAW_ARB);
+ glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB, sizeof(indices), indices, GL_STATIC_DRAW_ARB);
+
+ glEnableClientState( GL_VERTEX_ARRAY );
+ glVertexPointer( 4, GL_FLOAT, 0, Offset(&verts, position) );
+
+ glEnableClientState( GL_COLOR_ARRAY );
+ glColorPointer( 4, GL_UNSIGNED_BYTE, 0, Offset(&verts, color) );
+
+ glClientActiveTextureARB( GL_TEXTURE0_ARB );
+ glEnableClientState( GL_TEXTURE_COORD_ARRAY );
+ glTexCoordPointer( 2, GL_FLOAT, 0, Offset(&verts, tex0) );
+
+ glClientActiveTextureARB( GL_TEXTURE1_ARB );
+ glEnableClientState( GL_TEXTURE_COORD_ARRAY );
+ glTexCoordPointer( 2, GL_FLOAT, 0, Offset(&verts, tex1) );
+
+ glClientActiveTextureARB( GL_TEXTURE0_ARB );
+ }
+}
+
+static void Reshape(int width, int height)
+{
+
+ glViewport(0, 0, (GLint)width, (GLint)height);
+
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+/* glOrtho(-1.0, 1.0, -1.0, 1.0, -0.5, 1000.0); */
+ glMatrixMode(GL_MODELVIEW);
+}
+
+static void Key(unsigned char key, int x, int y)
+{
+
+ switch (key) {
+ case 27:
+ exit(1);
+ default:
+ return;
+ }
+
+ glutPostRedisplay();
+}
+
+static void Draw(void)
+{
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ glDrawElements( GL_TRIANGLES, 3, GL_UNSIGNED_INT, NULL );
+
+ glFlush();
+
+ if (doubleBuffer) {
+ glutSwapBuffers();
+ }
+}
+
+static GLenum Args(int argc, char **argv)
+{
+ GLint i;
+
+ doubleBuffer = GL_FALSE;
+
+ for (i = 1; i < argc; i++) {
+ if (strcmp(argv[i], "-sb") == 0) {
+ doubleBuffer = GL_FALSE;
+ } else if (strcmp(argv[i], "-db") == 0) {
+ doubleBuffer = GL_TRUE;
+ } else {
+ fprintf(stderr, "%s (Bad option).\n", argv[i]);
+ return GL_FALSE;
+ }
+ }
+ return GL_TRUE;
+}
+
+int main(int argc, char **argv)
+{
+ GLenum type;
+
+ glutInit(&argc, argv);
+
+ if (Args(argc, argv) == GL_FALSE) {
+ exit(1);
+ }
+
+ glutInitWindowPosition(0, 0); glutInitWindowSize( 250, 250);
+
+ type = GLUT_RGB | GLUT_ALPHA;
+ type |= (doubleBuffer) ? GLUT_DOUBLE : GLUT_SINGLE;
+ glutInitDisplayMode(type);
+
+ if (glutCreateWindow(*argv) == GL_FALSE) {
+ exit(1);
+ }
+
+ glewInit();
+ Init();
+
+ glutReshapeFunc(Reshape);
+ glutKeyboardFunc(Key);
+ glutDisplayFunc(Draw);
+ glutMainLoop();
+ return 0;
+}
diff --git a/progs/trivial/tri-orig.c b/progs/trivial/tri-orig.c
index 6861ff6e49..e7cfee3a36 100644
--- a/progs/trivial/tri-orig.c
+++ b/progs/trivial/tri-orig.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-query.c b/progs/trivial/tri-query.c
index 9b319ba2a7..85e39df2df 100644
--- a/progs/trivial/tri-query.c
+++ b/progs/trivial/tri-query.c
@@ -42,6 +42,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/tri-repeat.c b/progs/trivial/tri-repeat.c
index a271fab54c..91e355c71f 100644
--- a/progs/trivial/tri-repeat.c
+++ b/progs/trivial/tri-repeat.c
@@ -38,6 +38,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.3, 0.1, 0.3, 0.0);
}
diff --git a/progs/trivial/tri-scissor-tri.c b/progs/trivial/tri-scissor-tri.c
index 2b5536ecd6..608ebf29cf 100644
--- a/progs/trivial/tri-scissor-tri.c
+++ b/progs/trivial/tri-scissor-tri.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-square.c b/progs/trivial/tri-square.c
index 9102888abd..0b82a1dd8e 100644
--- a/progs/trivial/tri-square.c
+++ b/progs/trivial/tri-square.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-stipple.c b/progs/trivial/tri-stipple.c
index 33e6dd16a7..aa94fa224b 100644
--- a/progs/trivial/tri-stipple.c
+++ b/progs/trivial/tri-stipple.c
@@ -51,6 +51,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glEnable (GL_POLYGON_STIPPLE);
glPolygonStipple (fly);
diff --git a/progs/trivial/tri-tex-3d.c b/progs/trivial/tri-tex-3d.c
index 4f276af653..3ccbe12510 100644
--- a/progs/trivial/tri-tex-3d.c
+++ b/progs/trivial/tri-tex-3d.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/tri-tex.c b/progs/trivial/tri-tex.c
index 1dbbe6aa58..56afb4748d 100644
--- a/progs/trivial/tri-tex.c
+++ b/progs/trivial/tri-tex.c
@@ -36,6 +36,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
diff --git a/progs/trivial/tri-tri.c b/progs/trivial/tri-tri.c
index 8b0c2dafef..f996bd01a1 100644
--- a/progs/trivial/tri-tri.c
+++ b/progs/trivial/tri-tri.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-unfilled-clip.c b/progs/trivial/tri-unfilled-clip.c
index 438899dc1a..2fd894a49a 100644
--- a/progs/trivial/tri-unfilled-clip.c
+++ b/progs/trivial/tri-unfilled-clip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-unfilled-edgeflag.c b/progs/trivial/tri-unfilled-edgeflag.c
index 78c5ae8e9c..11c21d1bf6 100644
--- a/progs/trivial/tri-unfilled-edgeflag.c
+++ b/progs/trivial/tri-unfilled-edgeflag.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-unfilled-fog.c b/progs/trivial/tri-unfilled-fog.c
index 113b8d051d..c6ecc705b3 100644
--- a/progs/trivial/tri-unfilled-fog.c
+++ b/progs/trivial/tri-unfilled-fog.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-unfilled-point.c b/progs/trivial/tri-unfilled-point.c
index b050280155..750a254669 100644
--- a/progs/trivial/tri-unfilled-point.c
+++ b/progs/trivial/tri-unfilled-point.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-unfilled-smooth.c b/progs/trivial/tri-unfilled-smooth.c
index 9306af849a..eddae176e5 100644
--- a/progs/trivial/tri-unfilled-smooth.c
+++ b/progs/trivial/tri-unfilled-smooth.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-unfilled-tri-lit.c b/progs/trivial/tri-unfilled-tri-lit.c
index 775c3530b7..1d42b40b71 100644
--- a/progs/trivial/tri-unfilled-tri-lit.c
+++ b/progs/trivial/tri-unfilled-tri-lit.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glEnable(GL_LIGHTING);
glEnable(GL_LIGHT0);
diff --git a/progs/trivial/tri-unfilled-tri.c b/progs/trivial/tri-unfilled-tri.c
index ce789255fd..695cc89095 100644
--- a/progs/trivial/tri-unfilled-tri.c
+++ b/progs/trivial/tri-unfilled-tri.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-unfilled-userclip-stip.c b/progs/trivial/tri-unfilled-userclip-stip.c
index 6835b53c0f..ddc0dffd4f 100644
--- a/progs/trivial/tri-unfilled-userclip-stip.c
+++ b/progs/trivial/tri-unfilled-userclip-stip.c
@@ -41,6 +41,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
glClipPlane(GL_CLIP_PLANE0, plane);
diff --git a/progs/trivial/tri-unfilled-userclip.c b/progs/trivial/tri-unfilled-userclip.c
index aab5abc230..0dec0bfc9b 100644
--- a/progs/trivial/tri-unfilled-userclip.c
+++ b/progs/trivial/tri-unfilled-userclip.c
@@ -41,6 +41,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
glClipPlane(GL_CLIP_PLANE0, plane);
diff --git a/progs/trivial/tri-unfilled.c b/progs/trivial/tri-unfilled.c
index 4f50d083c2..b98cb9a842 100644
--- a/progs/trivial/tri-unfilled.c
+++ b/progs/trivial/tri-unfilled.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tri-userclip.c b/progs/trivial/tri-userclip.c
index 43d19cebab..8f37e0fae2 100644
--- a/progs/trivial/tri-userclip.c
+++ b/progs/trivial/tri-userclip.c
@@ -41,6 +41,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
glClipPlane(GL_CLIP_PLANE0, plane);
diff --git a/progs/trivial/tri-viewport.c b/progs/trivial/tri-viewport.c
index 3205b9ee9c..8e5f155c7d 100644
--- a/progs/trivial/tri-viewport.c
+++ b/progs/trivial/tri-viewport.c
@@ -35,6 +35,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.3, 0.1, 0.3, 0.0);
}
diff --git a/progs/trivial/tri-z-9.c b/progs/trivial/tri-z-9.c
index e7d4184bdb..099e89f6f4 100644
--- a/progs/trivial/tri-z-9.c
+++ b/progs/trivial/tri-z-9.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
}
diff --git a/progs/trivial/tri-z-eq.c b/progs/trivial/tri-z-eq.c
index 4ec55ac080..b81c992f7d 100644
--- a/progs/trivial/tri-z-eq.c
+++ b/progs/trivial/tri-z-eq.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
}
diff --git a/progs/trivial/tri.c b/progs/trivial/tri.c
index d99d5872a9..d44cb6a9fe 100644
--- a/progs/trivial/tri.c
+++ b/progs/trivial/tri.c
@@ -40,6 +40,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.3, 0.1, 0.3, 0.0);
}
diff --git a/progs/trivial/trifan-flat-clip.c b/progs/trivial/trifan-flat-clip.c
index ec7a50a75e..199f91a637 100644
--- a/progs/trivial/trifan-flat-clip.c
+++ b/progs/trivial/trifan-flat-clip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/trifan-flat-unfilled-clip.c b/progs/trivial/trifan-flat-unfilled-clip.c
index 4887b5a30c..ea3e155387 100644
--- a/progs/trivial/trifan-flat-unfilled-clip.c
+++ b/progs/trivial/trifan-flat-unfilled-clip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/trifan-flat.c b/progs/trivial/trifan-flat.c
index cf75d4cf08..d69b4887e3 100644
--- a/progs/trivial/trifan-flat.c
+++ b/progs/trivial/trifan-flat.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/trifan-unfilled.c b/progs/trivial/trifan-unfilled.c
index 491fe5b3df..91447e4e44 100644
--- a/progs/trivial/trifan-unfilled.c
+++ b/progs/trivial/trifan-unfilled.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/trifan.c b/progs/trivial/trifan.c
index ee9854dc94..84eb4172de 100644
--- a/progs/trivial/trifan.c
+++ b/progs/trivial/trifan.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tristrip-clip.c b/progs/trivial/tristrip-clip.c
index eeab676ea9..343e293804 100644
--- a/progs/trivial/tristrip-clip.c
+++ b/progs/trivial/tristrip-clip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tristrip-flat.c b/progs/trivial/tristrip-flat.c
index 49bb432b9d..02da97efce 100644
--- a/progs/trivial/tristrip-flat.c
+++ b/progs/trivial/tristrip-flat.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/trivial/tristrip.c b/progs/trivial/tristrip.c
index 023e6475c0..77bf2fad28 100644
--- a/progs/trivial/tristrip.c
+++ b/progs/trivial/tristrip.c
@@ -39,6 +39,7 @@ static void Init(void)
fprintf(stderr, "GL_RENDERER = %s\n", (char *) glGetString(GL_RENDERER));
fprintf(stderr, "GL_VERSION = %s\n", (char *) glGetString(GL_VERSION));
fprintf(stderr, "GL_VENDOR = %s\n", (char *) glGetString(GL_VENDOR));
+ fflush(stderr);
glClearColor(0.0, 0.0, 1.0, 0.0);
}
diff --git a/progs/vp/psiz-imm.txt b/progs/vp/psiz-imm.txt
new file mode 100644
index 0000000000..18de2498d6
--- /dev/null
+++ b/progs/vp/psiz-imm.txt
@@ -0,0 +1,5 @@
+!!ARBvp1.0
+MOV result.color, vertex.color;
+MOV result.pointsize, {2.0, 0, 0, 1};
+MOV result.position, vertex.position;
+END
diff --git a/progs/vp/psiz-mul-clamp.txt b/progs/vp/psiz-mul-clamp.txt
new file mode 100644
index 0000000000..284c032d79
--- /dev/null
+++ b/progs/vp/psiz-mul-clamp.txt
@@ -0,0 +1,9 @@
+!!ARBvp1.0
+TEMP R0;
+MOV result.color, vertex.color;
+MUL R0.x, vertex.color.x, {10.0}.x;
+MAX R0.x, R0.x, {2.0}.x;
+MIN result.pointsize.x, R0.x, {4.0}.x;
+MOV result.position, vertex.position;
+END
+
diff --git a/progs/vp/psiz-param-clamp.txt b/progs/vp/psiz-param-clamp.txt
new file mode 100644
index 0000000000..7f83fc4516
--- /dev/null
+++ b/progs/vp/psiz-param-clamp.txt
@@ -0,0 +1,10 @@
+!!ARBvp1.0
+TEMP R0;
+TEMP R1;
+MOV result.color, vertex.color;
+MUL R0.x, vertex.color.x, {10.0}.x;
+MAX R0.x, R0.x, {2.0}.x;
+MIN result.pointsize.x, R0.x, {4.0}.x;
+MOV result.position, vertex.position;
+END
+
diff --git a/progs/vpglsl/SConscript b/progs/vpglsl/SConscript
new file mode 100644
index 0000000000..640c5dd847
--- /dev/null
+++ b/progs/vpglsl/SConscript
@@ -0,0 +1,13 @@
+Import('env')
+
+if not env['GLUT']:
+ Return()
+
+env = env.Clone()
+
+env.Prepend(LIBS = ['$GLUT_LIB'])
+
+env.Program(
+ target = 'vp-tris',
+ source = ['vp-tris.c'],
+ )
diff --git a/progs/xdemos/Makefile b/progs/xdemos/Makefile
index bb353e318c..6581df8039 100644
--- a/progs/xdemos/Makefile
+++ b/progs/xdemos/Makefile
@@ -99,7 +99,7 @@ xrotfontdemo.o: xrotfontdemo.c xuserotfont.h
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) xrotfontdemo.c
corender: corender.o ipc.o
- $(APP_CC) $(CFLAGS) corender.o ipc.o $(LIBS) -o $@
+ $(APP_CC) $(CFLAGS) $(LDFLAGS) corender.o ipc.o $(LIBS) -o $@
corender.o: corender.c ipc.h
$(APP_CC) -c -I. -I$(INCDIR) $(X11_INCLUDES) $(CFLAGS) corender.c