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:
@@ -243,7 +243,8 @@ void TestGLCanvas::OnKeyDown( wxKeyEvent& event )
|
||||
i != wxTopLevelWindows.end();
|
||||
++i )
|
||||
{
|
||||
(*i)->Refresh(false);
|
||||
MyFrame *frame = (MyFrame *)*i;
|
||||
frame->RefreshCanvas();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -287,3 +288,7 @@ void MyFrame::OnNewWindow( wxCommandEvent& WXUNUSED(event) )
|
||||
(void) new MyFrame();
|
||||
}
|
||||
|
||||
void MyFrame::RefreshCanvas()
|
||||
{
|
||||
m_canvas->Refresh(false);
|
||||
}
|
||||
|
Reference in New Issue
Block a user