refresh GL canvas itself, not the frame, when the GL context changes, otherwise it doesn't redraw under wxGTK1

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45372 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-04-10 00:02:15 +00:00
parent 173ca738fd
commit 264f22613c
2 changed files with 12 additions and 3 deletions

View File

@@ -40,12 +40,16 @@ class MyFrame: public wxFrame
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);
private:
TestGLCanvas *m_canvas;
DECLARE_EVENT_TABLE()
@@ -56,11 +60,11 @@ class TestGLCanvas : public wxGLCanvas
public:
TestGLCanvas(wxWindow *parent);
private:
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; }