X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e4545e0183a7c117d9c745a165d1f57293d873e9..01a49fd4c45feebb15de2783fce97d6ed48b09e3:/samples/opengl/cube/cube.cpp diff --git a/samples/opengl/cube/cube.cpp b/samples/opengl/cube/cube.cpp index c4a60b515a..76e7466a9f 100644 --- a/samples/opengl/cube/cube.cpp +++ b/samples/opengl/cube/cube.cpp @@ -34,7 +34,7 @@ #include "cube.h" -#if !defined(__WXMSW__) && !defined(__WXPM__) +#ifndef wxHAS_IMAGES_IN_RESOURCES #include "../../sample.xpm" #endif @@ -323,10 +323,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(); }