tests: Now have two triangle tests using different shaders
diff --git a/tests/xgltestframework.cpp b/tests/xgltestframework.cpp
index 9200d6b..a324d0a 100644
--- a/tests/xgltestframework.cpp
+++ b/tests/xgltestframework.cpp
@@ -87,7 +87,6 @@
}
XglTestFramework::XglTestFramework() :
- m_glut_initialized( false ),
m_compile_options( 0 ),
m_num_shader_strings( 0 )
{
@@ -105,6 +104,7 @@
int XglTestFramework::m_width = 0;
int XglTestFramework::m_height = 0;
int XglTestFramework::m_window = 0;
+bool XglTestFramework::m_glut_initialized = false;
std::list<XglTestImageRecord> XglTestFramework::m_images;
std::list<XglTestImageRecord>::iterator XglTestFramework::m_display_image;
int m_display_image_idx = 0;
@@ -165,7 +165,7 @@
{
string filename;
XGL_RESULT err;
- int x, y;
+ int x, y;
filename.append(basename);
filename.append(".ppm");
@@ -267,7 +267,8 @@
m_images.push_back(record);
m_display_image = --m_images.end();
- Display();
+// Display();
+ glutPostRedisplay();
err = image->UnmapMemory();
ASSERT_XGL_SUCCESS( err );
@@ -279,11 +280,11 @@
::testing::UnitTest::GetInstance()->current_test_info();
if (m_save_images) {
- WritePPM(test_info->test_case_name(), image);
+ WritePPM(test_info->name(), image);
}
if (m_show_images) {
- Show(test_info->test_case_name(), image);
+ Show(test_info->name(), image);
}
}
@@ -347,6 +348,7 @@
glutKeyboardFunc( Key );
glutSpecialFunc( SpecialKey );
glutDisplayFunc( Display );
+ glutIdleFunc(NULL);
glutMainLoop();
}