summaryrefslogtreecommitdiff
path: root/tests/general
diff options
context:
space:
mode:
authorTimothy Arceri <tarceri@itsqueeze.com>2018-06-24 11:52:23 +1000
committerTimothy Arceri <tarceri@itsqueeze.com>2018-06-27 12:41:42 +1000
commit179dec6b8a82233107310f144ef6d6c9a77adb3a (patch)
tree5f309ff594c9c987fb0b027282879777bd62f33a /tests/general
parent7e2235cd35562cc6a7174ece7605a6da40c8e33b (diff)
general: better test display lists in attribute test
We weren't really testing that the displays list worked since the calls could have just been executed immediately. Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Diffstat (limited to 'tests/general')
-rw-r--r--tests/general/attribs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/general/attribs.c b/tests/general/attribs.c
index 05a0d4a1e..ddb0b060a 100644
--- a/tests/general/attribs.c
+++ b/tests/general/attribs.c
@@ -107,6 +107,18 @@ static void draw_quad(unsigned mode, float *v,
}
glEnd();
glEndList();
+
+ /* Clear to make sure the calls didn't get executed
+ * immediately.
+ */
+ glBegin(GL_QUADS);
+ for (i = 0; i < 4; i++) {
+ attrib(0.1, 0.1, 0.1, 0.1);
+ glVertex2fv(&verts[i*2]);
+ }
+ glEnd();
+
+ /* Now call the display list */
glCallList(1);
break;
default: