]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/opengl/cube/cube.h
refresh GL canvas itself, not the frame, when the GL context changes, otherwise it...
[wxWidgets.git] / samples / opengl / cube / cube.h
index 56e6899fc7056861bf161562abdef3a2d77781ad..1fa19dc7c91876dd428af501d05aad4bf26bf49e 100644 (file)
@@ -40,12 +40,16 @@ class MyFrame: public wxFrame
 public:
     MyFrame();
 
 public:
     MyFrame();
 
+    // update the image shown on the canvas (after the shared wxGLContext was
+    // updated, presumably)
+    void RefreshCanvas();
+
+private:
     void OnExit(wxCommandEvent& event);
     void OnNewWindow(wxCommandEvent& event);
     void OnDefRotateLeftKey(wxCommandEvent& event);
     void OnDefRotateRightKey(wxCommandEvent& event);
 
     void OnExit(wxCommandEvent& event);
     void OnNewWindow(wxCommandEvent& event);
     void OnDefRotateLeftKey(wxCommandEvent& event);
     void OnDefRotateRightKey(wxCommandEvent& event);
 
-private:
     TestGLCanvas *m_canvas;
 
     DECLARE_EVENT_TABLE()
     TestGLCanvas *m_canvas;
 
     DECLARE_EVENT_TABLE()
@@ -56,11 +60,11 @@ class TestGLCanvas : public wxGLCanvas
 public:
     TestGLCanvas(wxWindow *parent);
 
 public:
     TestGLCanvas(wxWindow *parent);
 
+private:
     void OnPaint(wxPaintEvent& event);
     void OnSize(wxSizeEvent& event);
     void OnKeyDown(wxKeyEvent& event);
 
     void OnPaint(wxPaintEvent& event);
     void OnSize(wxSizeEvent& event);
     void OnKeyDown(wxKeyEvent& event);
 
-private:
     // OpenGL calls can't be done until we're initialized
     bool IsInitialized() const { return m_gllist != 0; }
 
     // OpenGL calls can't be done until we're initialized
     bool IsInitialized() const { return m_gllist != 0; }