From: José Fonseca Date: Mon, 5 Dec 2011 08:28:55 +0000 (+0000) Subject: Split default state checking into a separate test. X-Git-Url: https://git.cworth.org/git?p=apitrace-tests;a=commitdiff_plain;h=6dde1c49a726a38e86e61b1a85a1014954e79cad Split default state checking into a separate test. --- diff --git a/apps/gl/CMakeLists.txt b/apps/gl/CMakeLists.txt index ba8ad16..18913dd 100644 --- a/apps/gl/CMakeLists.txt +++ b/apps/gl/CMakeLists.txt @@ -32,6 +32,12 @@ foreach (target ${targets}) endif () endforeach (target) +add_app_test ( + NAME "gl_default" + TARGET ${api}_tri + REF default.ref.txt +) + add_app_test ( NAME "gl_varray_drawarrays" TARGET ${api}_varray diff --git a/apps/gl/default.ref.txt b/apps/gl/default.ref.txt new file mode 100644 index 0000000..ae43f86 --- /dev/null +++ b/apps/gl/default.ref.txt @@ -0,0 +1,17 @@ +glClearColor(red = 0.3, green = 0.1, blue = 0.3, alpha = 1) +glViewport(x = 0, y = 0, width = 250, height = 250) +glMatrixMode(mode = GL_PROJECTION) +glLoadIdentity() +glOrtho(left = -1, right = 1, bottom = -1, top = 1, zNear = -0.5, zFar = 1000) +glMatrixMode(mode = GL_MODELVIEW) +glClear(mask = GL_COLOR_BUFFER_BIT) +glBegin(mode = GL_TRIANGLES) +glColor3f(red = 0.8, green = 0, blue = 0) +glVertex3f(x = -0.9, y = -0.9, z = -30) +glColor3f(red = 0, green = 0.9, blue = 0) +glVertex3f(x = 0.9, y = -0.9, z = -30) +glColor3f(red = 0, green = 0, blue = 0.7) +glVertex3f(x = 0, y = 0.9, z = -30) +glEnd() +glFlush() +#image tri.ref.png diff --git a/apps/gl/tri.ref.txt b/apps/gl/tri.ref.txt index 724154b..ae43f86 100644 --- a/apps/gl/tri.ref.txt +++ b/apps/gl/tri.ref.txt @@ -1,4 +1,3 @@ -#state default.ref.json glClearColor(red = 0.3, green = 0.1, blue = 0.3, alpha = 1) glViewport(x = 0, y = 0, width = 250, height = 250) glMatrixMode(mode = GL_PROJECTION)