summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2010-09-27 15:57:33 -0600
committerBrian Paul <brianp@vmware.com>2010-09-27 16:00:24 -0600
commit9682c3021140961d26c4c6b1dcc1d148eb137cd2 (patch)
treed5ae1b69f3a29a1b30ec5d4383c67dd445e14dd9
parent1830b8ae997f0312940fece082c18d98c44ac530 (diff)
glean/tfbo: Put lines in the middle of the pixel, not the edge.
GL lets the implementation be +/- a pixel on line location. It was getting rounded down on the intel driver, so the lines weren't drawn to 1D FBOs. This should have a better chance on drivers in general. (cherry-picked from piglit commit 9fdd8d9d1fc56178c950ba8fbca8abfb2e9d8b96)
-rw-r--r--src/glean/tfbo.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/glean/tfbo.cpp b/src/glean/tfbo.cpp
index 591e78d..f24fe7f 100644
--- a/src/glean/tfbo.cpp
+++ b/src/glean/tfbo.cpp
@@ -674,8 +674,8 @@ FBOTest::testRender2SingleTexture(void)
switch (textureModes[mode]) {
case GL_TEXTURE_1D:
glBegin(GL_LINES);
- glVertex3f(TEXSIZE / 4, 0, 0.3);
- glVertex3f(TEXSIZE * 5 / 8, 0, 0.3);
+ glVertex3f(TEXSIZE / 4, 0.5, 0.3);
+ glVertex3f(TEXSIZE * 5 / 8, 0.5, 0.3);
glEnd();
break;
case GL_TEXTURE_2D:
@@ -704,8 +704,8 @@ FBOTest::testRender2SingleTexture(void)
switch (textureModes[mode]) {
case GL_TEXTURE_1D:
glBegin(GL_LINES);
- glVertex3f(TEXSIZE / 2, 0, 0.3);
- glVertex3f(TEXSIZE * 7 / 8, 0, 0.3);
+ glVertex3f(TEXSIZE / 2, 0.5, 0.3);
+ glVertex3f(TEXSIZE * 7 / 8, 0.5, 0.3);
glEnd();
break;
case GL_TEXTURE_2D:
@@ -735,8 +735,8 @@ FBOTest::testRender2SingleTexture(void)
switch (textureModes[mode]) {
case GL_TEXTURE_1D:
glBegin(GL_LINES);
- glVertex3f(0, 0, 0.2);
- glVertex3f(TEXSIZE, 0, 0.2);
+ glVertex3f(0, 0.5, 0.2);
+ glVertex3f(TEXSIZE, 0.5, 0.2);
glEnd();
break;
case GL_TEXTURE_2D: