aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2004-02-04 15:27:39 +0000
committerKeith Whitwell <[email protected]>2004-02-04 15:27:39 +0000
commit72aeea4eea1454efcdd78908343bbebd99ebcc01 (patch)
tree91f35d0973db78f7bc39002ca8b45cae97e55ce9
parent867fa0b5726f7b6c56961eecc33049b6755e58bf (diff)
Use quads instead of lines to ensure this is testing stencil functionality
rather than rasterization. A crutch to hw with wonky line rasterizers.
-rw-r--r--progs/tests/stencilwrap.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/progs/tests/stencilwrap.c b/progs/tests/stencilwrap.c
index da875412ada..f7d3ecd38da 100644
--- a/progs/tests/stencilwrap.c
+++ b/progs/tests/stencilwrap.c
@@ -13,7 +13,7 @@
static void RunTest(void)
{
- const GLenum prim = GL_LINES;
+ const GLenum prim = GL_QUAD_STRIP;
GLubyte val;
int bits, max, i;
GLboolean failed;
@@ -33,7 +33,8 @@ static void RunTest(void)
for (i = 1; i < max+10; i++) {
int expected = (i > max) ? max : i;
glBegin(prim);
- glVertex2f(0.5, 0.5); glVertex2f(9.5, 0.5);
+ glVertex2f(0, 0); glVertex2f(10, 0);
+ glVertex2f(0, 10); glVertex2f(10, 10);
glEnd();
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
@@ -55,7 +56,8 @@ static void RunTest(void)
for (i = 1; i < max+10; i++) {
int expected = i % (max + 1);
glBegin(prim);
- glVertex2f(0.5, 0.5); glVertex2f(9.5, 0.5);
+ glVertex2f(0, 0); glVertex2f(10, 0);
+ glVertex2f(0, 10); glVertex2f(10, 10);
glEnd();
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
if (val != expected) {
@@ -76,7 +78,8 @@ static void RunTest(void)
for (i = max-1; i > -10; i--) {
int expected = (i < 0) ? 0 : i;
glBegin(prim);
- glVertex2f(0.5, 0.5); glVertex2f(9.5, 0.5);
+ glVertex2f(0, 0); glVertex2f(10, 0);
+ glVertex2f(0, 10); glVertex2f(10, 10);
glEnd();
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
if (val != expected) {
@@ -95,7 +98,8 @@ static void RunTest(void)
for (i = max-1; i > -10; i--) {
int expected = (i < 0) ? max + i + 1: i;
glBegin(prim);
- glVertex2f(0.5, 0.5); glVertex2f(9.5, 0.5);
+ glVertex2f(0, 0); glVertex2f(10, 0);
+ glVertex2f(0, 10); glVertex2f(10, 10);
glEnd();
glReadPixels(0, 0, 1, 1, GL_STENCIL_INDEX, GL_UNSIGNED_BYTE, &val);
if (val != expected) {