render_test: Add OpenGL display engine
diff --git a/tests/render_tests.cpp b/tests/render_tests.cpp
index d0ae998..6eadb24 100644
--- a/tests/render_tests.cpp
+++ b/tests/render_tests.cpp
@@ -67,6 +67,8 @@
#include "xgldevice.h"
#include "icd-bil.h"
+#include "displayengine.h"
+
//--------------------------------------------------------------------------------------
// Mesh and VertexFormat Data
//--------------------------------------------------------------------------------------
@@ -209,6 +211,7 @@
void InitMesh( XGL_UINT32 numVertices, XGL_GPU_SIZE vbStride, const void* vertices );
void DrawTriangleTest();
void WritePPM( const char *filename, int width, int height );
+ DisplayEngine m_screen;
protected:
XGL_APPLICATION_INFO app_info;
@@ -261,7 +264,6 @@
}
};
-
void XglRenderTest::CreateImage(XGL_UINT w, XGL_UINT h, XGL_IMAGE *pImage,
XGL_GPU_MEMORY *pMem)
{
@@ -273,6 +275,8 @@
mipCount = 0;
+ m_screen.Init(true, w, h);
+
XGL_UINT _w = w;
XGL_UINT _h = h;
while( ( _w > 0 ) || ( _h > 0 ) )
@@ -878,6 +882,7 @@
DestroyQueryPool(query, query_mem);
WritePPM( "TriangleTest.ppm", width, height );
+ m_screen.Display(m_image, m_image_mem);
ASSERT_XGL_SUCCESS(xglDestroyObject(pipeline));
ASSERT_XGL_SUCCESS(xglDestroyObject(m_cmdBuffer));
@@ -941,6 +946,8 @@
}
int main(int argc, char **argv) {
+// glutInit(argc, argv);
::testing::InitGoogleTest(&argc, argv);
+ glutInit(&argc, argv);
return RUN_ALL_TESTS();
}