fix the sample to work under X11 (where a context can't be made current before the window is realized)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@45370 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-04-09 23:03:54 +00:00
parent 43c742d005
commit b94d29a7a1
2 changed files with 21 additions and 3 deletions

View File

@@ -61,7 +61,10 @@ public:
void OnKeyDown(wxKeyEvent& event);
private:
// one-time OpenGL initialization
// OpenGL calls can't be done until we're initialized
bool IsInitialized() const { return m_gllist != 0; }
// one-time OpenGL initialization, only does something if !IsInitialized()
void InitGL();
// render to window