]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/opengl/cube/cube.cpp
forwarding mouse moved events to the view under the mouse, not the firstResponder
[wxWidgets.git] / samples / opengl / cube / cube.cpp
index c4a60b515a32edfae2802131090abc6ac1ddd373..17318f6f4fe332a1c14ca21e4df3263d4cad5547 100644 (file)
@@ -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();
 }