Split default state checking into a separate test.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Mon, 5 Dec 2011 08:28:55 +0000 (08:28 +0000)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Mon, 5 Dec 2011 08:28:55 +0000 (08:28 +0000)
apps/gl/CMakeLists.txt
apps/gl/default.ref.txt [new file with mode: 0644]
apps/gl/tri.ref.txt

index ba8ad164f0a47e5cd8403637cf33039243988d4a..18913dd74b3dbc738c767a66fb9333fb39c9d7ff 100644 (file)
@@ -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 (file)
index 0000000..ae43f86
--- /dev/null
@@ -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
index 724154b28ee95b786508e517fbd054d6dfc09833..ae43f8662acc3199b126c0474b66e77b54d262de 100644 (file)
@@ -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)