]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/opengl/cube/cube.cpp
Disable test for setting the creation time under Unix.
[wxWidgets.git] / samples / opengl / cube / cube.cpp
index c4a60b515a32edfae2802131090abc6ac1ddd373..cda5cca7616d11ea7b597a391b7c85f9e8827c9a 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "cube.h"
 
-#if !defined(__WXMSW__) && !defined(__WXPM__)
+#ifndef wxHAS_IMAGES_IN_RESOURCES
     #include "../../sample.xpm"
 #endif
 
@@ -138,6 +138,7 @@ TestGLContext::TestGLContext(wxGLCanvas *canvas)
     SetCurrent(*canvas);
 
     // set up the parameters we want to use
+    glEnable(GL_CULL_FACE);
     glEnable(GL_DEPTH_TEST);
     glEnable(GL_LIGHTING);
     glEnable(GL_LIGHT0);
@@ -323,10 +324,11 @@ void TestGLCanvas::OnPaint(wxPaintEvent& WXUNUSED(event))
     // is wrong when next another canvas is repainted.
     const wxSize ClientSize = GetClientSize();
 
+    TestGLContext& canvas = wxGetApp().GetContext(this);
     glViewport(0, 0, ClientSize.x, ClientSize.y);
 
     // Render the graphics and swap the buffers.
-    wxGetApp().GetContext(this).DrawRotatedCube(m_xangle, m_yangle);
+    canvas.DrawRotatedCube(m_xangle, m_yangle);
     SwapBuffers();
 }