X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7f1b6179cd5d14910f5e838109f123cc027b40dd..97f851007c07fa09d5ee9b3e26a46fe29f2575b8:/samples/opengl/cube/cube.cpp diff --git a/samples/opengl/cube/cube.cpp b/samples/opengl/cube/cube.cpp index c4a60b515a..17318f6f4f 100644 --- a/samples/opengl/cube/cube.cpp +++ b/samples/opengl/cube/cube.cpp @@ -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(); }