From daad54f6ced3e5ec33fba0c213d5ce7eef96c2d1 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Wed, 10 Mar 2010 10:59:02 -0700
Subject: progs/tests: add additional FBO->window test paths (disabled)
Normally use glReadPixels + glDrawPixels. Add debug/test paths for
glCopyPixels and glBlitFramebuffer.
---
progs/tests/fbotest2.c | 46 +++++++++++++++++++++++++++++++++++++---------
1 file changed, 37 insertions(+), 9 deletions(-)
(limited to 'progs')
diff --git a/progs/tests/fbotest2.c b/progs/tests/fbotest2.c
index 872b46279e..faf0dd8748 100644
--- a/progs/tests/fbotest2.c
+++ b/progs/tests/fbotest2.c
@@ -33,7 +33,8 @@ CheckError(int line)
static void
Display( void )
{
- GLubyte *buffer = malloc(Width * Height * 4);
+ GLboolean copyPix = GL_FALSE;
+ GLboolean blitPix = GL_FALSE;
GLenum status;
CheckError(__LINE__);
@@ -63,16 +64,43 @@ Display( void )
glutSolidTeapot(2.0);
glPopMatrix();
- /* read from user framebuffer */
- glReadPixels(0, 0, Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
+ if (copyPix) {
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, MyFB);
+ glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ glDrawBuffer(GL_BACK);
- /* draw to window */
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
- glDisable(GL_DEPTH_TEST); /* in case window has depth buffer */
- glWindowPos2iARB(0, 0);
- glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
+ glDisable(GL_DEPTH_TEST); /* in case window has depth buffer */
+
+ glWindowPos2iARB(0, 0);
+ glCopyPixels(0, 0, Width, Height, GL_COLOR);
+ }
+ else if (blitPix) {
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, MyFB);
+ glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ glDrawBuffer(GL_BACK);
+
+ glDisable(GL_DEPTH_TEST); /* in case window has depth buffer */
+
+ glBlitFramebufferEXT(0, 0, Width, Height,
+ 0, 0, Width, Height,
+ GL_COLOR_BUFFER_BIT, GL_NEAREST);
+ }
+ else {
+ GLubyte *buffer = malloc(Width * Height * 4);
+ /* read from user framebuffer */
+ glReadPixels(0, 0, Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
+
+ /* draw to window */
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glDisable(GL_DEPTH_TEST); /* in case window has depth buffer */
+ glWindowPos2iARB(0, 0);
+ glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
+
+ free(buffer);
+ }
- free(buffer);
glutSwapBuffers();
CheckError(__LINE__);
}
--
cgit v1.2.3
From 9a7ba79b2bb60d83fc3bc04280e64cc564cb8760 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Wed, 10 Mar 2010 11:51:44 -0700
Subject: progs/trivial: added clear-fbo-scissor.c to test scissored clear of
FBO
---
progs/trivial/Makefile | 1 +
progs/trivial/SConscript | 3 +-
progs/trivial/clear-fbo-scissor.c | 186 ++++++++++++++++++++++++++++++++++++++
3 files changed, 189 insertions(+), 1 deletion(-)
create mode 100644 progs/trivial/clear-fbo-scissor.c
(limited to 'progs')
diff --git a/progs/trivial/Makefile b/progs/trivial/Makefile
index b4a903cb68..a10748f948 100644
--- a/progs/trivial/Makefile
+++ b/progs/trivial/Makefile
@@ -11,6 +11,7 @@ include $(TOP)/configs/current
LIBS = -L$(TOP)/$(LIB_DIR) -l $(GLEW_LIB) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) $(APP_LIB_DEPS)
SOURCES = \
+ clear-fbo-scissor.c \
clear-fbo-tex.c \
clear-fbo.c \
clear-scissor.c \
diff --git a/progs/trivial/SConscript b/progs/trivial/SConscript
index f480da047e..24b4f91fb0 100644
--- a/progs/trivial/SConscript
+++ b/progs/trivial/SConscript
@@ -1,7 +1,8 @@
Import('*')
progs = [
- 'clear-fbo-tex',
+ 'clear-fbo-scissor',
+ 'clear-fbo-tex',
'clear-fbo',
'clear-scissor',
'clear-undefined',
diff --git a/progs/trivial/clear-fbo-scissor.c b/progs/trivial/clear-fbo-scissor.c
new file mode 100644
index 0000000000..b0d9651772
--- /dev/null
+++ b/progs/trivial/clear-fbo-scissor.c
@@ -0,0 +1,186 @@
+/*
+ * Use scissor to clear the four quadrants of the FBO to different
+ * colors. Then draw a grey triangle in the middle.
+ */
+
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+
+static int Width = 512, Height = 512;
+static GLuint MyFB, MyRB;
+
+
+#define CheckError() assert(glGetError() == 0)
+
+
+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")) {
+ printf("GL_EXT_framebuffer_object not found!\n");
+ exit(0);
+ }
+
+ glGenFramebuffersEXT(1, &MyFB);
+ glGenRenderbuffersEXT(1, &MyRB);
+
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB);
+
+ glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, MyRB);
+
+ glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
+ GL_RENDERBUFFER_EXT, MyRB);
+
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
+
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+}
+
+
+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, -1.0, 1.0);
+ glMatrixMode(GL_MODELVIEW);
+
+ Width = width;
+ Height = height;
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
+}
+
+
+static void
+Key(unsigned char key, int x, int y)
+{
+ if (key == 27) {
+ exit(0);
+ }
+ glutPostRedisplay();
+}
+
+
+static void
+Draw(void)
+{
+ GLboolean scissor = GL_TRUE;
+ GLboolean copyPix = GL_FALSE;
+
+ /* draw to user framebuffer */
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB);
+ glDrawBuffer(GL_COLOR_ATTACHMENT0_EXT);
+ glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
+
+ glViewport(0, 0, Width, Height);
+ CheckError();
+
+ if (scissor) {
+ glEnable(GL_SCISSOR_TEST);
+
+ /* lower-left = red */
+ glClearColor(1, 0, 0, 0);
+ glScissor(0, 0, Width / 2, Height / 2);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ /* lower-right = green */
+ glClearColor(0, 1, 0, 0);
+ glScissor(Width / 2, 0, Width - Width / 2, Height / 2);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ /* upper-left = blue */
+ glClearColor(0, 0, 1, 0);
+ glScissor(0, Height / 2, Width / 2, Height - Height / 2);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ /* upper-right = white */
+ glClearColor(1, 1, 1, 0);
+ glScissor(Width / 2, Height / 2, Width - Width / 2, Height - Height / 2);
+ glClear(GL_COLOR_BUFFER_BIT);
+
+ glDisable(GL_SCISSOR_TEST);
+ }
+ else {
+ glClearColor(0, 1, 0, 0);
+ glClear(GL_COLOR_BUFFER_BIT);
+ }
+
+ /* gray triangle in middle, pointing up */
+ glColor3f(0.5, 0.5, 0.5);
+ glBegin(GL_TRIANGLES);
+ glVertex2f(Width/4, Height/4);
+ glVertex2f(Width*3/4, Height/4);
+ glVertex2f(Width/2, Height*3/4);
+ glVertex2f(-0.5, -0.5);
+ glVertex2f(+0.5, -0.5);
+ glVertex2f( 0.0, 0.7);
+ glEnd();
+
+ CheckError();
+
+ /* copy fbo to window */
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, MyFB);
+ glReadBuffer(GL_COLOR_ATTACHMENT0_EXT);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
+ glDrawBuffer(GL_BACK);
+
+ if (copyPix) {
+ glWindowPos2i(0, 0);
+ glCopyPixels(0, 0, Width, Height, GL_COLOR);
+ }
+ else {
+ GLubyte *buffer = malloc(Width * Height * 4);
+
+ /* read from user framebuffer */
+ glReadPixels(0, 0, Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
+
+ /* draw to window */
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+ glWindowPos2iARB(0, 0);
+ glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
+
+ free(buffer);
+ }
+
+ /* Bind normal framebuffer */
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
+
+ glutSwapBuffers();
+
+ CheckError();
+}
+
+
+int
+main(int argc, char *argv[])
+{
+ glutInit(&argc, argv);
+ glutInitWindowPosition(100, 0);
+ glutInitWindowSize(Width, Height);
+ glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
+
+ if (!glutCreateWindow(argv[0])) {
+ exit(1);
+ }
+
+ glewInit();
+ Init();
+ glutReshapeFunc(Reshape);
+ glutKeyboardFunc(Key);
+ glutDisplayFunc(Draw);
+ glutMainLoop();
+ return 0;
+}
--
cgit v1.2.3
From 3c48f40f61d8122009175273b3c15e108927b146 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Wed, 10 Mar 2010 12:19:26 -0700
Subject: progs/trivial: add -t (RTT) option for clear-fbo-scissor.c
---
progs/trivial/clear-fbo-scissor.c | 38 +++++++++++++++++++++++++++++++++-----
1 file changed, 33 insertions(+), 5 deletions(-)
(limited to 'progs')
diff --git a/progs/trivial/clear-fbo-scissor.c b/progs/trivial/clear-fbo-scissor.c
index b0d9651772..5ec0b57328 100644
--- a/progs/trivial/clear-fbo-scissor.c
+++ b/progs/trivial/clear-fbo-scissor.c
@@ -15,6 +15,7 @@
static int Width = 512, Height = 512;
static GLuint MyFB, MyRB;
+static GLboolean UseTex = GL_FALSE;
#define CheckError() assert(glGetError() == 0)
@@ -38,12 +39,25 @@ Init(void)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB);
- glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, MyRB);
+ if (UseTex) {
+ GLuint tex;
+ glGenTextures(1, &tex);
+ glBindTexture(GL_TEXTURE_2D, tex);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, Width, Height, 0,
+ GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,
+ GL_COLOR_ATTACHMENT0_EXT,
+ GL_TEXTURE_2D, tex, 0);
+ }
+ else {
+ glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, MyRB);
- glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT,
- GL_RENDERBUFFER_EXT, MyRB);
+ glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,
+ GL_COLOR_ATTACHMENT0_EXT,
+ GL_RENDERBUFFER_EXT, MyRB);
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
+ }
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
}
@@ -60,7 +74,9 @@ Reshape(int width, int height)
Width = width;
Height = height;
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
+ if (!UseTex) {
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
+ }
}
@@ -167,11 +183,23 @@ Draw(void)
int
main(int argc, char *argv[])
{
+ int i;
+
glutInit(&argc, argv);
glutInitWindowPosition(100, 0);
glutInitWindowSize(Width, Height);
glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE);
+ for (i = 1; i < argc; i++) {
+ if (strcmp(argv[i], "-t") == 0)
+ UseTex = GL_TRUE;
+ }
+
+ if (UseTex)
+ printf("Using render to texture\n");
+ else
+ printf("Using user-created render buffer\n");
+
if (!glutCreateWindow(argv[0])) {
exit(1);
}
--
cgit v1.2.3
From 5f80dad7fd03ca811f2b0561269be0180970dbf8 Mon Sep 17 00:00:00 2001
From: Zack Rusin
Date: Wed, 10 Mar 2010 15:37:18 -0500
Subject: fpglsl: add some for and while loops
---
progs/fpglsl/for.glsl | 11 +++++++++++
progs/fpglsl/while.glsl | 7 +++++++
2 files changed, 18 insertions(+)
create mode 100644 progs/fpglsl/for.glsl
create mode 100644 progs/fpglsl/while.glsl
(limited to 'progs')
diff --git a/progs/fpglsl/for.glsl b/progs/fpglsl/for.glsl
new file mode 100644
index 0000000000..6aa03d6ef4
--- /dev/null
+++ b/progs/fpglsl/for.glsl
@@ -0,0 +1,11 @@
+uniform int KernelSizeInt;
+
+void main() {
+ int i;
+ vec4 sum = vec4(0.0);
+ for (i = 0; i < KernelSizeInt; ++i) {
+ sum.g += 0.25;
+ }
+ sum.a = 1;
+ gl_FragColor = sum;
+}
diff --git a/progs/fpglsl/while.glsl b/progs/fpglsl/while.glsl
new file mode 100644
index 0000000000..05fb860ddc
--- /dev/null
+++ b/progs/fpglsl/while.glsl
@@ -0,0 +1,7 @@
+void main() {
+ float sum = 0.0;
+ while (sum < 0.499999) {
+ sum += 0.1;
+ }
+ gl_FragColor = vec4(sum);
+}
--
cgit v1.2.3
From 1ad0a0fd8fb5314e33c1b4f82c9e487c05f80fb8 Mon Sep 17 00:00:00 2001
From: Zack Rusin
Date: Wed, 10 Mar 2010 15:42:26 -0500
Subject: fpglsl: set an integer uniform required by the loop example
---
progs/fpglsl/fp-tri.c | 5 +++++
1 file changed, 5 insertions(+)
(limited to 'progs')
diff --git a/progs/fpglsl/fp-tri.c b/progs/fpglsl/fp-tri.c
index c9b08fbbad..8af09845dd 100644
--- a/progs/fpglsl/fp-tri.c
+++ b/progs/fpglsl/fp-tri.c
@@ -128,6 +128,11 @@ static void setup_uniforms()
}
+ {
+ GLint loci = glGetUniformLocationARB(program, "KernelSizeInt");
+ if (loci >= 0)
+ glUniform1i(loci, 4);
+ }
{
GLint loc1f = glGetUniformLocationARB(program, "KernelValue1f");
GLint loc2f = glGetUniformLocationARB(program, "KernelValue2f");
--
cgit v1.2.3
From a44f362567f6ed4054e88d8afc94d38f19ed6269 Mon Sep 17 00:00:00 2001
From: Zack Rusin
Date: Wed, 10 Mar 2010 16:31:18 -0500
Subject: fpglsl: a few more useful glsl tests
---
progs/fpglsl/dowhile.glsl | 8 ++++++++
progs/fpglsl/dowhile2.glsl | 10 ++++++++++
progs/fpglsl/forbreak.glsl | 13 +++++++++++++
progs/fpglsl/simpleif.glsl | 6 ++++++
progs/fpglsl/while2.glsl | 9 +++++++++
5 files changed, 46 insertions(+)
create mode 100644 progs/fpglsl/dowhile.glsl
create mode 100644 progs/fpglsl/dowhile2.glsl
create mode 100644 progs/fpglsl/forbreak.glsl
create mode 100644 progs/fpglsl/simpleif.glsl
create mode 100644 progs/fpglsl/while2.glsl
(limited to 'progs')
diff --git a/progs/fpglsl/dowhile.glsl b/progs/fpglsl/dowhile.glsl
new file mode 100644
index 0000000000..ed9d729675
--- /dev/null
+++ b/progs/fpglsl/dowhile.glsl
@@ -0,0 +1,8 @@
+void main() {
+ float sum = 0.0;
+ do {
+ sum += 0.1;
+ break;
+ } while (true);
+ gl_FragColor = vec4(sum);
+}
diff --git a/progs/fpglsl/dowhile2.glsl b/progs/fpglsl/dowhile2.glsl
new file mode 100644
index 0000000000..f3e00b8e86
--- /dev/null
+++ b/progs/fpglsl/dowhile2.glsl
@@ -0,0 +1,10 @@
+void main() {
+ float sum = 0.0;
+ do {
+ sum += 0.1;
+ if (sum < 0.499999)
+ continue;
+ break;
+ } while (true);
+ gl_FragColor = vec4(sum);
+}
diff --git a/progs/fpglsl/forbreak.glsl b/progs/fpglsl/forbreak.glsl
new file mode 100644
index 0000000000..87669c6575
--- /dev/null
+++ b/progs/fpglsl/forbreak.glsl
@@ -0,0 +1,13 @@
+uniform int KernelSizeInt;
+
+void main() {
+ int i;
+ vec4 sum = vec4(0.0);
+ for (i = 0; i < KernelSizeInt; ++i) {
+ sum.g += 0.25;
+ if (i > 0)
+ break;
+ }
+ sum.a = 1;
+ gl_FragColor = sum;
+}
diff --git a/progs/fpglsl/simpleif.glsl b/progs/fpglsl/simpleif.glsl
new file mode 100644
index 0000000000..922421b410
--- /dev/null
+++ b/progs/fpglsl/simpleif.glsl
@@ -0,0 +1,6 @@
+void main() {
+ // this should always be true
+ if (gl_FragCoord.x >= 0.0) {
+ gl_FragColor = vec4(0.5, 0.0, 0.5, 1.0);
+ }
+}
diff --git a/progs/fpglsl/while2.glsl b/progs/fpglsl/while2.glsl
new file mode 100644
index 0000000000..19c8904e28
--- /dev/null
+++ b/progs/fpglsl/while2.glsl
@@ -0,0 +1,9 @@
+void main() {
+ float sum = 0.0;
+ while (true) {
+ sum += 0.1;
+ if (sum > 0.8)
+ break;
+ }
+ gl_FragColor = vec4(sum);
+}
--
cgit v1.2.3
From d5ccbea63cb9ba96cd4c0e2f40824ec1939c806c Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Wed, 10 Mar 2010 14:32:56 -0700
Subject: progs/trivial: make clear-fbo-scissor.c work with other GL drivers
NVIDIA's driver requires that the texture that we're going to render into
be complete. Need to set min/mag filters to non-mipmap modes.
Plus added other error/debug checks.
---
progs/trivial/clear-fbo-scissor.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
(limited to 'progs')
diff --git a/progs/trivial/clear-fbo-scissor.c b/progs/trivial/clear-fbo-scissor.c
index 5ec0b57328..28c613ccfb 100644
--- a/progs/trivial/clear-fbo-scissor.c
+++ b/progs/trivial/clear-fbo-scissor.c
@@ -11,6 +11,7 @@
#include
#include
#include
+#include
static int Width = 512, Height = 512;
@@ -18,12 +19,20 @@ static GLuint MyFB, MyRB;
static GLboolean UseTex = GL_FALSE;
-#define CheckError() assert(glGetError() == 0)
+#define CheckError() \
+ do { \
+ GLenum err = glGetError(); \
+ if (err != GL_NO_ERROR) \
+ printf("Error: %s\n", gluErrorString(err)); \
+ assert(err == GL_NO_ERROR); \
+ } while (0)
static void
Init(void)
{
+ GLenum status;
+
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));
@@ -45,6 +54,8 @@ Init(void)
glBindTexture(GL_TEXTURE_2D, tex);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, Width, Height, 0,
GL_RGBA, GL_UNSIGNED_BYTE, NULL);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT,
GL_COLOR_ATTACHMENT0_EXT,
GL_TEXTURE_2D, tex, 0);
@@ -59,6 +70,11 @@ Init(void)
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_RGB, Width, Height);
}
+ status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
+ if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
+ fprintf(stderr, "Framebuffer object is incomplete (0x%x)!\n", status);
+ }
+
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
}
@@ -134,6 +150,8 @@ Draw(void)
glClear(GL_COLOR_BUFFER_BIT);
}
+ CheckError();
+
/* gray triangle in middle, pointing up */
glColor3f(0.5, 0.5, 0.5);
glBegin(GL_TRIANGLES);
--
cgit v1.2.3
From c7be039fad6d93911d1142fc5dea18d0c2684143 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Wed, 10 Mar 2010 14:35:57 -0700
Subject: progs/trivial: use -c option to use glCopyPixels()
Otherwise we use glRead/DrawPixels to copy the off-screen FBO image
into the window.
Looks like NVIDIA's broken when using -c (the image is upside down),
but OK with -c -t.
---
progs/trivial/clear-fbo-scissor.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
(limited to 'progs')
diff --git a/progs/trivial/clear-fbo-scissor.c b/progs/trivial/clear-fbo-scissor.c
index 28c613ccfb..6a605e16a8 100644
--- a/progs/trivial/clear-fbo-scissor.c
+++ b/progs/trivial/clear-fbo-scissor.c
@@ -17,6 +17,7 @@
static int Width = 512, Height = 512;
static GLuint MyFB, MyRB;
static GLboolean UseTex = GL_FALSE;
+static GLboolean UseCopyPix = GL_FALSE;
#define CheckError() \
@@ -110,7 +111,6 @@ static void
Draw(void)
{
GLboolean scissor = GL_TRUE;
- GLboolean copyPix = GL_FALSE;
/* draw to user framebuffer */
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, MyFB);
@@ -171,7 +171,7 @@ Draw(void)
glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, 0);
glDrawBuffer(GL_BACK);
- if (copyPix) {
+ if (UseCopyPix) {
glWindowPos2i(0, 0);
glCopyPixels(0, 0, Width, Height, GL_COLOR);
}
@@ -211,6 +211,8 @@ main(int argc, char *argv[])
for (i = 1; i < argc; i++) {
if (strcmp(argv[i], "-t") == 0)
UseTex = GL_TRUE;
+ else if (strcmp(argv[i], "-c") == 0)
+ UseCopyPix = GL_TRUE;
}
if (UseTex)
--
cgit v1.2.3
From 8f7e06ddf646d6ec001a19a4b571595e50ba28b4 Mon Sep 17 00:00:00 2001
From: Vinson Lee
Date: Thu, 11 Mar 2010 00:10:26 -0800
Subject: progs/fpglsl: Fix GLSL compilation failures on Mac OS X.
---
progs/fpglsl/for.glsl | 2 +-
progs/fpglsl/forbreak.glsl | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
(limited to 'progs')
diff --git a/progs/fpglsl/for.glsl b/progs/fpglsl/for.glsl
index 6aa03d6ef4..862ca8bd6c 100644
--- a/progs/fpglsl/for.glsl
+++ b/progs/fpglsl/for.glsl
@@ -6,6 +6,6 @@ void main() {
for (i = 0; i < KernelSizeInt; ++i) {
sum.g += 0.25;
}
- sum.a = 1;
+ sum.a = 1.0;
gl_FragColor = sum;
}
diff --git a/progs/fpglsl/forbreak.glsl b/progs/fpglsl/forbreak.glsl
index 87669c6575..0b8d957cb0 100644
--- a/progs/fpglsl/forbreak.glsl
+++ b/progs/fpglsl/forbreak.glsl
@@ -8,6 +8,6 @@ void main() {
if (i > 0)
break;
}
- sum.a = 1;
+ sum.a = 1.0;
gl_FragColor = sum;
}
--
cgit v1.2.3
From e9f654d2fb9e747d555a8e5f5fe0b4efdb1bc261 Mon Sep 17 00:00:00 2001
From: Brian Paul
Date: Thu, 11 Mar 2010 14:42:11 -0700
Subject: progs/demos: added 'f' key to toggle filtering mode in stex3d.c
---
progs/demos/stex3d.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
(limited to 'progs')
diff --git a/progs/demos/stex3d.c b/progs/demos/stex3d.c
index c0bbea0960..de18480c25 100644
--- a/progs/demos/stex3d.c
+++ b/progs/demos/stex3d.c
@@ -36,6 +36,7 @@ static int tex_width=64, tex_height=64, tex_depth=64;
static float angx=0, angy=0, angz=0;
static int texgen = 2, animate = 1, smooth = 1, wireframe = 0;
static int CurTexture = NOISE_TEXTURE, CurObject = TORUS;
+static GLenum Filter = GL_LINEAR;
static void
@@ -298,8 +299,6 @@ create3Dtexture(void)
printf("setting up 3d texture...\n");
glBindTexture(GL_TEXTURE_3D, NOISE_TEXTURE);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT);
@@ -406,6 +405,9 @@ drawScene(void)
glDisable(GL_TEXTURE_GEN_R);
}
+ glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, Filter);
+ glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, Filter);
+
glCallList(CurObject);
glPopMatrix();
@@ -505,6 +507,12 @@ KeyHandler(unsigned char key, int x, int y)
else
CurObject = TORUS;
break;
+ case 'f':
+ if (Filter == GL_LINEAR)
+ Filter = GL_NEAREST;
+ else
+ Filter = GL_LINEAR;
+ break;
case 'i':
if (CurTexture == NOISE_TEXTURE)
CurTexture = GRADIENT_TEXTURE;
@@ -513,6 +521,7 @@ KeyHandler(unsigned char key, int x, int y)
glBindTexture(GL_TEXTURE_3D, CurTexture);
break;
case 'a':
+ case ' ':
animate = !animate;
if (animate)
glutIdleFunc(Idle);
@@ -559,8 +568,6 @@ create3Dgradient(void)
glBindTexture(GL_TEXTURE_3D, GRADIENT_TEXTURE);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, GL_REPEAT);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, GL_REPEAT);
glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, GL_REPEAT);
--
cgit v1.2.3
From fab1f07d6ad01463897ae792f4b33738afb07369 Mon Sep 17 00:00:00 2001
From: Jeff Smith
Date: Fri, 13 Jun 2008 09:50:43 -0500
Subject: Grammar and spelling fixes
Signed-off-by: Jeff Smith
Signed-off-by: Brian Paul
---
docs/README.3DFX | 2 +-
docs/egl.html | 2 +-
progs/objviewer/glm.c | 2 +-
progs/objviewer/glm.h | 2 +-
progs/tests/vao-01.c | 2 +-
progs/tests/vao-02.c | 2 +-
src/gallium/auxiliary/os/os_time.h | 2 +-
src/gallium/drivers/cell/ppu/cell_gen_fragment.c | 2 +-
src/gallium/drivers/cell/ppu/cell_spu.c | 2 +-
src/gallium/drivers/nv40/nv40_vertprog.c | 2 +-
src/gallium/drivers/r300/r300_reg.h | 4 ++--
src/gallium/state_trackers/wgl/stw_framebuffer.h | 2 +-
src/glu/sgi/libnurbs/nurbtess/partitionY.h | 2 +-
src/glu/sgi/libtess/normal.c | 2 +-
src/mesa/drivers/dri/common/dri_util.c | 2 +-
src/mesa/drivers/dri/r128/r128_tex.c | 2 +-
src/mesa/drivers/dri/r200/r200_reg.h | 2 +-
src/mesa/drivers/dri/r300/r300_reg.h | 4 ++--
src/mesa/drivers/dri/radeon/radeon_state.c | 2 +-
src/mesa/drivers/x11/xmesa.h | 2 +-
src/mesa/drivers/x11/xmesaP.h | 2 +-
src/mesa/main/dd.h | 2 +-
src/mesa/main/texcompress_fxt1.c | 2 +-
src/mesa/math/m_debug_util.h | 2 +-
src/mesa/math/m_matrix.c | 2 +-
src/mesa/shader/prog_instruction.h | 4 ++--
src/mesa/shader/program_parser.h | 2 +-
src/mesa/shader/slang/library/slang_common_builtin.gc | 2 +-
src/mesa/swrast/s_depth.c | 2 +-
src/mesa/vbo/vbo_save_loopback.c | 2 +-
30 files changed, 33 insertions(+), 33 deletions(-)
(limited to 'progs')
diff --git a/docs/README.3DFX b/docs/README.3DFX
index 037e8fa7cc..7feda6f33f 100644
--- a/docs/README.3DFX
+++ b/docs/README.3DFX
@@ -644,7 +644,7 @@ Hints and Special Features:
- The Voodoo driver supports the GL_EXT_paletted_texture. it works
only with GL_COLOR_INDEX8_EXT, GL_RGBA palettes and the alpha value
- is ignored because this is a limitation of the the current Glide
+ is ignored because this is a limitation of the current Glide
version and of the Voodoo hardware. See Mesa-3.1/3Dfx/demos/paltex.c for
a demo of this extension.
diff --git a/docs/egl.html b/docs/egl.html
index 82cc06600b..55907f6cfa 100644
--- a/docs/egl.html
+++ b/docs/egl.html
@@ -28,7 +28,7 @@ cards.
-
-
Run configure
with the desired state trackers and and enable
+
Run configure
with the desired state trackers and enable
the Gallium driver for your hardware. For example
diff --git a/progs/objviewer/glm.c b/progs/objviewer/glm.c
index 7c964e489d..77e62bfab1 100644
--- a/progs/objviewer/glm.c
+++ b/progs/objviewer/glm.c
@@ -1041,7 +1041,7 @@ glmFacetNormals(GLMmodel* model)
/* glmVertexNormals: Generates smooth vertex normals for a model.
* First builds a list of all the triangles each vertex is in. Then
- * loops through each vertex in the the list averaging all the facet
+ * loops through each vertex in the list averaging all the facet
* normals of the triangles each vertex is in. Finally, sets the
* normal index in the triangle for the vertex to the generated smooth
* normal. If the dot product of a facet normal and the facet normal
diff --git a/progs/objviewer/glm.h b/progs/objviewer/glm.h
index 8740b3684d..1a5646fa4c 100644
--- a/progs/objviewer/glm.h
+++ b/progs/objviewer/glm.h
@@ -153,7 +153,7 @@ glmFacetNormals(GLMmodel* model);
/* glmVertexNormals: Generates smooth vertex normals for a model.
* First builds a list of all the triangles each vertex is in. Then
- * loops through each vertex in the the list averaging all the facet
+ * loops through each vertex in the list averaging all the facet
* normals of the triangles each vertex is in. Finally, sets the
* normal index in the triangle for the vertex to the generated smooth
* normal. If the dot product of a facet normal and the facet normal
diff --git a/progs/tests/vao-01.c b/progs/tests/vao-01.c
index e4a89cb19d..ee528d2243 100644
--- a/progs/tests/vao-01.c
+++ b/progs/tests/vao-01.c
@@ -30,7 +30,7 @@
* it (via \c glPopClientAttrib). After popping, the state of the VAO is
* examined.
*
- * According the the APPLE_vertex_array_object spec, the contents of the VAO
+ * According to the APPLE_vertex_array_object spec, the contents of the VAO
* should be restored to the values that they had when pushed.
*
* \author Ian Romanick
diff --git a/progs/tests/vao-02.c b/progs/tests/vao-02.c
index 9f7f5c2779..c23b4ab05a 100644
--- a/progs/tests/vao-02.c
+++ b/progs/tests/vao-02.c
@@ -30,7 +30,7 @@
* it (via \c glPopClientAttrib). After popping, the state of the VAO is
* examined.
*
- * According the the APPLE_vertex_array_object spec, the contents of the VAO
+ * According to the APPLE_vertex_array_object spec, the contents of the VAO
* should be restored to the values that they had when pushed.
*
* \author Ian Romanick
diff --git a/src/gallium/auxiliary/os/os_time.h b/src/gallium/auxiliary/os/os_time.h
index 5b55c1b374..7e0f67a76b 100644
--- a/src/gallium/auxiliary/os/os_time.h
+++ b/src/gallium/auxiliary/os/os_time.h
@@ -71,7 +71,7 @@ os_time_sleep(int64_t usecs);
/*
* Helper function for detecting time outs, taking in account overflow.
*
- * Returns true the the current time has elapsed beyond the specified interval.
+ * Returns true if the current time has elapsed beyond the specified interval.
*/
static INLINE boolean
os_time_timeout(int64_t start,
diff --git a/src/gallium/drivers/cell/ppu/cell_gen_fragment.c b/src/gallium/drivers/cell/ppu/cell_gen_fragment.c
index 576d514741..c54576b3c3 100644
--- a/src/gallium/drivers/cell/ppu/cell_gen_fragment.c
+++ b/src/gallium/drivers/cell/ppu/cell_gen_fragment.c
@@ -1352,7 +1352,7 @@ gen_stencil_values(struct spe_function *f,
*/
ASSERT(fbS_reg != newS_reg);
- /* The code also assumes the the stencil_max_value is of the form
+ /* The code also assumes that the stencil_max_value is of the form
* 2^n-1 and can therefore be used as a mask for the valid bits in
* addition to a maximum. Make sure this is the case as well.
* The clever math below exploits the fact that incrementing a
diff --git a/src/gallium/drivers/cell/ppu/cell_spu.c b/src/gallium/drivers/cell/ppu/cell_spu.c
index 28e5e6d706..39284f3a5d 100644
--- a/src/gallium/drivers/cell/ppu/cell_spu.c
+++ b/src/gallium/drivers/cell/ppu/cell_spu.c
@@ -135,7 +135,7 @@ cell_thread_function(void *arg)
/**
* Create the SPU threads. This is done once during driver initialization.
- * This involves setting the the "init" message which is sent to each SPU.
+ * This involves setting the "init" message which is sent to each SPU.
* The init message specifies an SPU id, total number of SPUs, location
* and number of batch buffers, etc.
*/
diff --git a/src/gallium/drivers/nv40/nv40_vertprog.c b/src/gallium/drivers/nv40/nv40_vertprog.c
index b289eef0fc..c93c5d127c 100644
--- a/src/gallium/drivers/nv40/nv40_vertprog.c
+++ b/src/gallium/drivers/nv40/nv40_vertprog.c
@@ -742,7 +742,7 @@ nv40_vertprog_translate(struct nv40_context *nv40,
}
/* Redirect post-transform vertex position to a temp if user clip
- * planes are enabled. We need to append code the the vtxprog
+ * planes are enabled. We need to append code to the vtxprog
* to handle clip planes later.
*/
if (vp->ucp.nr) {
diff --git a/src/gallium/drivers/r300/r300_reg.h b/src/gallium/drivers/r300/r300_reg.h
index a249e8b36b..c67cc86871 100644
--- a/src/gallium/drivers/r300/r300_reg.h
+++ b/src/gallium/drivers/r300/r300_reg.h
@@ -540,7 +540,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_PVS_FIRST_INST(x) ((x) << 0)
# define R300_PVS_XYZW_VALID_INST(x) ((x) << 10)
# define R300_PVS_LAST_INST(x) ((x) << 20)
-/* Addresses are relative the the vertex program parameters area. */
+/* Addresses are relative to the vertex program parameters area. */
#define R300_VAP_PVS_CONST_CNTL 0x22D4
# define R300_PVS_CONST_BASE_OFFSET_SHIFT 0
# define R300_PVS_MAX_CONST_ADDR_SHIFT 16
@@ -1857,7 +1857,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
* The destination register index is in FPI1 (color) and FPI3 (alpha)
* together with enable bits.
* There are separate enable bits for writing into temporary registers
- * (DSTC_REG_* /DSTA_REG) and and program output registers (DSTC_OUTPUT_*
+ * (DSTC_REG_* /DSTA_REG) and program output registers (DSTC_OUTPUT_*
* /DSTA_OUTPUT). You can write to both at once, or not write at all (the
* same index must be used for both).
*
diff --git a/src/gallium/state_trackers/wgl/stw_framebuffer.h b/src/gallium/state_trackers/wgl/stw_framebuffer.h
index 08cc4973bc..e61e9bf9c2 100644
--- a/src/gallium/state_trackers/wgl/stw_framebuffer.h
+++ b/src/gallium/state_trackers/wgl/stw_framebuffer.h
@@ -45,7 +45,7 @@ struct stw_framebuffer
/**
* This mutex has two purposes:
* - protect the access to the mutable data members below
- * - prevent the the framebuffer from being deleted while being accessed.
+ * - prevent the framebuffer from being deleted while being accessed.
*
* It is OK to lock this mutex while holding the stw_device::fb_mutex lock,
* but the opposite must never happen.
diff --git a/src/glu/sgi/libnurbs/nurbtess/partitionY.h b/src/glu/sgi/libnurbs/nurbtess/partitionY.h
index 8dda409de1..5570c183d7 100644
--- a/src/glu/sgi/libnurbs/nurbtess/partitionY.h
+++ b/src/glu/sgi/libnurbs/nurbtess/partitionY.h
@@ -39,7 +39,7 @@
*or both at or below v. In addition, at least one of the ajacent verteces is
*strictly below or above v.
* A vertex is a relex vertex if the internals angle is strictly greater than
- *180. In other words, if the the signed area is negative:
+ *180. In other words, if the signed area is negative:
*(x1, y1), (x2, y2), (x3, y3) are the three vertices along a polygon, the
*order is such that left hand side is inside the polygon. Then (x2,y2) is
*reflex if:
diff --git a/src/glu/sgi/libtess/normal.c b/src/glu/sgi/libtess/normal.c
index 0a2494be34..7ab83167bb 100644
--- a/src/glu/sgi/libtess/normal.c
+++ b/src/glu/sgi/libtess/normal.c
@@ -142,7 +142,7 @@ static void CheckOrientation( GLUtesselator *tess )
GLUhalfEdge *e;
/* When we compute the normal automatically, we choose the orientation
- * so that the the sum of the signed areas of all contours is non-negative.
+ * so that the sum of the signed areas of all contours is non-negative.
*/
area = 0;
for( f = fHead->next; f != fHead; f = f->next ) {
diff --git a/src/mesa/drivers/dri/common/dri_util.c b/src/mesa/drivers/dri/common/dri_util.c
index 890ae51339..75c98825b7 100644
--- a/src/mesa/drivers/dri/common/dri_util.c
+++ b/src/mesa/drivers/dri/common/dri_util.c
@@ -698,7 +698,7 @@ setupLoaderExtensions(__DRIscreen *psp,
* \param drm_version Version of the kernel DRM.
* \param frame_buffer Data describing the location and layout of the
* framebuffer.
- * \param pSAREA Pointer the the SAREA.
+ * \param pSAREA Pointer to the SAREA.
* \param fd Device handle for the DRM.
* \param extensions ??
* \param driver_modes Returns modes suppoted by the driver
diff --git a/src/mesa/drivers/dri/r128/r128_tex.c b/src/mesa/drivers/dri/r128/r128_tex.c
index 24fbf8f519..4ec4be9a47 100644
--- a/src/mesa/drivers/dri/r128/r128_tex.c
+++ b/src/mesa/drivers/dri/r128/r128_tex.c
@@ -468,7 +468,7 @@ static void r128TexEnv( GLcontext *ctx, GLenum target,
* certain point. It is better than completely ignoring the LOD
* bias. Unfortunately there isn't much range in the bias, the
* spec mentions strides that vary between 0.5 and 2.0 but these
- * numbers don't seem to relate the the GL LOD bias value at all.
+ * numbers don't seem to relate to the GL LOD bias value at all.
*/
if ( param[0] >= 1.0 ) {
bias = -128;
diff --git a/src/mesa/drivers/dri/r200/r200_reg.h b/src/mesa/drivers/dri/r200/r200_reg.h
index 59115212ce..b3a4940a7a 100644
--- a/src/mesa/drivers/dri/r200/r200_reg.h
+++ b/src/mesa/drivers/dri/r200/r200_reg.h
@@ -690,7 +690,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R200_PVS_CNTL_1_PROGRAM_START_SHIFT 0
# define R200_PVS_CNTL_1_POS_END_SHIFT 10
# define R200_PVS_CNTL_1_PROGRAM_END_SHIFT 20
-/* Addresses are relative the the vertex program parameters area. */
+/* Addresses are relative to the vertex program parameters area. */
#define R200_VAP_PVS_CNTL_2 0x22d4
# define R200_PVS_CNTL_2_PARAM_OFFSET_SHIFT 0
# define R200_PVS_CNTL_2_PARAM_COUNT_SHIFT 16
diff --git a/src/mesa/drivers/dri/r300/r300_reg.h b/src/mesa/drivers/dri/r300/r300_reg.h
index d18ebab8ff..ac93563ed9 100644
--- a/src/mesa/drivers/dri/r300/r300_reg.h
+++ b/src/mesa/drivers/dri/r300/r300_reg.h
@@ -482,7 +482,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
# define R300_PVS_FIRST_INST_SHIFT 0
# define R300_PVS_XYZW_VALID_INST_SHIFT 10
# define R300_PVS_LAST_INST_SHIFT 20
-/* Addresses are relative the the vertex program parameters area. */
+/* Addresses are relative to the vertex program parameters area. */
#define R300_VAP_PVS_CONST_CNTL 0x22D4
# define R300_PVS_CONST_BASE_OFFSET_SHIFT 0
# define R300_PVS_MAX_CONST_ADDR_SHIFT 16
@@ -1760,7 +1760,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
* The destination register index is in FPI1 (color) and FPI3 (alpha)
* together with enable bits.
* There are separate enable bits for writing into temporary registers
- * (DSTC_REG_* /DSTA_REG) and and program output registers (DSTC_OUTPUT_*
+ * (DSTC_REG_* /DSTA_REG) and program output registers (DSTC_OUTPUT_*
* /DSTA_OUTPUT). You can write to both at once, or not write at all (the
* same index must be used for both).
*
diff --git a/src/mesa/drivers/dri/radeon/radeon_state.c b/src/mesa/drivers/dri/radeon/radeon_state.c
index 0ce97e8697..583751d64d 100644
--- a/src/mesa/drivers/dri/radeon/radeon_state.c
+++ b/src/mesa/drivers/dri/radeon/radeon_state.c
@@ -1900,7 +1900,7 @@ void radeonUploadTexMatrix( r100ContextPtr rmesa,
So: if we need the q coord in the end (solely determined by the texture
target, i.e. 2d / 1d / texrect targets) we swap the third and 4th row.
Additionally, if we don't have texgen but 4 tex coords submitted, we swap
- column 3 and 4 (for the 2d / 1d / texrect targets) since the the q coord
+ column 3 and 4 (for the 2d / 1d / texrect targets) since the q coord
will get submitted in the "wrong", i.e. 3rd, slot.
If an app submits 3 coords for 2d targets, we assume it is saving on vertex
size and using the texture matrix to swap the r and q coords around (ut2k3
diff --git a/src/mesa/drivers/x11/xmesa.h b/src/mesa/drivers/x11/xmesa.h
index 98139af833..f63626a970 100644
--- a/src/mesa/drivers/x11/xmesa.h
+++ b/src/mesa/drivers/x11/xmesa.h
@@ -287,7 +287,7 @@ extern void XMesaCopySubBuffer( XMesaBuffer b,
/*
- * Return a pointer to the the Pixmap or XImage being used as the back
+ * Return a pointer to the Pixmap or XImage being used as the back
* color buffer of an XMesaBuffer. This function is a way to get "under
* the hood" of X/Mesa so one can manipulate the back buffer directly.
* Input: b - the XMesaBuffer
diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h
index 3ffd7661e3..e0a6908228 100644
--- a/src/mesa/drivers/x11/xmesaP.h
+++ b/src/mesa/drivers/x11/xmesaP.h
@@ -431,7 +431,7 @@ extern const int xmesa_kernel8[DITH_DY * DITH_DX];
* If pixelformat==PF_HPCR:
*
* HP Color Recovery dithering (ad@lms.be 30/08/95)
- * HP has on it's 8-bit 700-series computers, a feature called
+ * HP has on its 8-bit 700-series computers, a feature called
* 'Color Recovery'. This allows near 24-bit output (so they say).
* It is enabled by selecting the 8-bit TrueColor visual AND
* corresponding colormap (see tkInitWindow) AND doing some special
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 197de09b22..7c02faaa53 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -1072,7 +1072,7 @@ struct dd_function_table {
* These are the initial values to be installed into dispatch by
* mesa. If the T&L driver wants to modify the dispatch table
* while installed, it must do so itself. It would be possible for
- * the vertexformat to install it's own initial values for these
+ * the vertexformat to install its own initial values for these
* functions, but this way there is an obvious list of what is
* expected of the driver.
*
diff --git a/src/mesa/main/texcompress_fxt1.c b/src/mesa/main/texcompress_fxt1.c
index 149853f7ac..04acf05e52 100644
--- a/src/mesa/main/texcompress_fxt1.c
+++ b/src/mesa/main/texcompress_fxt1.c
@@ -476,7 +476,7 @@ fxt1_lloyd (GLfloat vec[][MAX_COMP], GLint nv,
* for each sample color
* sort to nearest vector.
*
- * replace each vector with the centroid of it's matching colors.
+ * replace each vector with the centroid of its matching colors.
*
* repeat until RMS doesn't improve.
*
diff --git a/src/mesa/math/m_debug_util.h b/src/mesa/math/m_debug_util.h
index 2e67db8e55..ed11c849ec 100644
--- a/src/mesa/math/m_debug_util.h
+++ b/src/mesa/math/m_debug_util.h
@@ -61,7 +61,7 @@ extern long counter_overhead;
*/
extern char *mesa_profile;
-/* Modify the the number of tests if you like.
+/* Modify the number of tests if you like.
* We take the minimum of all results, because every error should be
* positive (time used by other processes, task switches etc).
* It is assumed that all calculations are done in the cache.
diff --git a/src/mesa/math/m_matrix.c b/src/mesa/math/m_matrix.c
index ef8a40fbec..4b33d0bbb3 100644
--- a/src/mesa/math/m_matrix.c
+++ b/src/mesa/math/m_matrix.c
@@ -889,7 +889,7 @@ _math_matrix_rotate( GLmatrix *mat,
* Y-axis to bring the axis vector parallel with the X-axis. The
* rotation about the X-axis is then performed. Ry and Rz are
* simply the respective inverse transforms to bring the arbitrary
- * axis back to it's original orientation. The first transforms
+ * axis back to its original orientation. The first transforms
* Rz' and Ry' are considered inverses, since the data from the
* arbitrary axis gives you info on how to get to it, not how
* to get away from it, and an inverse must be applied.
diff --git a/src/mesa/shader/prog_instruction.h b/src/mesa/shader/prog_instruction.h
index 224350caac..28c797a4ba 100644
--- a/src/mesa/shader/prog_instruction.h
+++ b/src/mesa/shader/prog_instruction.h
@@ -97,8 +97,8 @@
#define COND_EQ 2 /**< equal to zero */
#define COND_LT 3 /**< less than zero */
#define COND_UN 4 /**< unordered (NaN) */
-#define COND_GE 5 /**< greater then or equal to zero */
-#define COND_LE 6 /**< less then or equal to zero */
+#define COND_GE 5 /**< greater than or equal to zero */
+#define COND_LE 6 /**< less than or equal to zero */
#define COND_NE 7 /**< not equal to zero */
#define COND_TR 8 /**< always true */
#define COND_FL 9 /**< always false */
diff --git a/src/mesa/shader/program_parser.h b/src/mesa/shader/program_parser.h
index 730466c30f..be952d4b9c 100644
--- a/src/mesa/shader/program_parser.h
+++ b/src/mesa/shader/program_parser.h
@@ -62,7 +62,7 @@ struct asm_symbol {
*/
unsigned param_binding_swizzle;
- /* This is how many entries in the the program_parameter_list we take up
+ /* This is how many entries in the program_parameter_list we take up
* with our state tokens or constants. Note that this is _not_ the same as
* the number of param registers we eventually use.
*/
diff --git a/src/mesa/shader/slang/library/slang_common_builtin.gc b/src/mesa/shader/slang/library/slang_common_builtin.gc
index 8b7771c284..a25ca55bc4 100644
--- a/src/mesa/shader/slang/library/slang_common_builtin.gc
+++ b/src/mesa/shader/slang/library/slang_common_builtin.gc
@@ -695,7 +695,7 @@ vec3 normalize(const vec3 v)
{
// const float s = inversesqrt(dot(v, v));
// __retVal = v * s;
-// XXX note, we _could_ use __retVal.w instead of tmp and and save a
+// XXX note, we _could_ use __retVal.w instead of tmp and save a
// register, but that's actually a compilation error because v is a vec3
// and the .w suffix is illegal. Oh well.
float tmp;
diff --git a/src/mesa/swrast/s_depth.c b/src/mesa/swrast/s_depth.c
index 3e36cf9a7e..ed637cac12 100644
--- a/src/mesa/swrast/s_depth.c
+++ b/src/mesa/swrast/s_depth.c
@@ -526,7 +526,7 @@ _swrast_depth_clamp_span( GLcontext *ctx, SWspan *span )
/* Convert floating point values in [0,1] to device Z coordinates in
* [0, DepthMax].
- * ex: If the the Z buffer has 24 bits, DepthMax = 0xffffff.
+ * ex: If the Z buffer has 24 bits, DepthMax = 0xffffff.
*
* XXX this all falls apart if we have 31 or more bits of Z because
* the triangle rasterization code produces unsigned Z values. Negative
diff --git a/src/mesa/vbo/vbo_save_loopback.c b/src/mesa/vbo/vbo_save_loopback.c
index f253c854d2..3f581ea02d 100644
--- a/src/mesa/vbo/vbo_save_loopback.c
+++ b/src/mesa/vbo/vbo_save_loopback.c
@@ -78,7 +78,7 @@ struct loopback_attr {
};
/* Don't emit ends and begins on wrapped primitives. Don't replay
- * wrapped vertices. If we get here, it's probably because the the
+ * wrapped vertices. If we get here, it's probably because the
* precalculated wrapping is wrong.
*/
static void loopback_prim( GLcontext *ctx,
--
cgit v1.2.3
From 978706042317edd9fde90e613cc73d87ddd7d7b8 Mon Sep 17 00:00:00 2001
From: Jeff Smith
Date: Tue, 9 Mar 2010 12:40:44 -0600
Subject: Add -L$(libdir) for xdemos and egl so that the right libX11 is found
Signed-off-by: Jeff Smith
Signed-off-by: Brian Paul
---
progs/egl/Makefile | 6 +++---
progs/xdemos/Makefile | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
(limited to 'progs')
diff --git a/progs/egl/Makefile b/progs/egl/Makefile
index c003cf3cc5..25de6e1f70 100644
--- a/progs/egl/Makefile
+++ b/progs/egl/Makefile
@@ -57,13 +57,13 @@ peglgears: peglgears.o $(HEADERS) $(LIB_DEP)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) $(LIBDRM_LIB) -lm
xeglgears: xeglgears.o $(HEADERS) $(LIB_DEP)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lX11 -lm
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
xeglthreads: xeglthreads.o $(HEADERS) $(LIB_DEP)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lX11 -lm
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
xegl_tri: xegl_tri.o $(HEADERS) $(LIB_DEP)
- $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lX11
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(LIBS) -lm -L$(libdir) -lX11
clean:
-rm -f *.o *~
diff --git a/progs/xdemos/Makefile b/progs/xdemos/Makefile
index 9cf984b59e..e87d55d011 100644
--- a/progs/xdemos/Makefile
+++ b/progs/xdemos/Makefile
@@ -11,7 +11,7 @@ LIB_DEP = $(TOP)/$(LIB_DIR)/$(GL_LIB_NAME)
# Add X11 and pthread libs to satisfy GNU gold.
APP_LIB_DEPS += -lX11 -lpthread
-LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) $(APP_LIB_DEPS)
+LIBS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -L$(libdir) $(APP_LIB_DEPS)
PROGS = \
corender \
--
cgit v1.2.3
From 3aa86928838f65e7f9896bae39ffc966d2df2d73 Mon Sep 17 00:00:00 2001
From: Jeff Smith
Date: Fri, 2 Mar 2007 00:14:48 -0600
Subject: Add programs to .gitignore in xdemos
Signed-off-by: Jeff Smith
Signed-off-by: Brian Paul
---
progs/xdemos/.gitignore | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
(limited to 'progs')
diff --git a/progs/xdemos/.gitignore b/progs/xdemos/.gitignore
index a65b890d3d..2f5e909079 100644
--- a/progs/xdemos/.gitignore
+++ b/progs/xdemos/.gitignore
@@ -13,11 +13,14 @@ glxpixmap
glxsnoop
glxswapcontrol
manywin
+msctest
multictx
offset
+omlsync
overlay
-pbdemo
pbinfo
+pbdemo
+shape
sharedtex
sharedtex_mt
texture_from_pixmap
@@ -26,5 +29,3 @@ xdemo
xfont
xrotfontdemo
yuvrect_client
-msctest
-omlsync
--
cgit v1.2.3
From 9b81103b1ac872276a2ac8eabf0d7631121fc961 Mon Sep 17 00:00:00 2001
From: Jeff Smith
Date: Thu, 11 Mar 2010 20:19:49 -0600
Subject: Add programs to .gitignore in redbook
Signed-off-by: Jeff Smith
Signed-off-by: Brian Paul
---
progs/redbook/.gitignore | 13 +++++++++++++
1 file changed, 13 insertions(+)
(limited to 'progs')
diff --git a/progs/redbook/.gitignore b/progs/redbook/.gitignore
index 8ed3efe3e2..60a77523e2 100644
--- a/progs/redbook/.gitignore
+++ b/progs/redbook/.gitignore
@@ -12,29 +12,39 @@ bezmesh
checker
clip
colormat
+combiner
+convolution
cube
+cubemap
depthcue
dof
double
drawf
feedback
fog
+fogcoord
fogindex
font
hello
+histogram
image
light
lines
list
material
+minmax
mipmap
model
movelight
+multisamp
+multitex
+mvarray
nurbs
pickdepth
picksquare
plane
planet
+pointp
polyoff
polys
quadric
@@ -44,10 +54,12 @@ scene
scenebamb
sceneflat
select
+shadowmap
smooth
stencil
stroke
surface
+surfpoints
teaambient
teapots
tess
@@ -56,6 +68,7 @@ texbind
texgen
texprox
texsub
+texture3d
texturesurf
torus
trim
--
cgit v1.2.3