- int width, height;
- GetClientSize(& width, & height);
-
-#ifndef __WXMOTIF__
- if (GetContext())
-#endif
- {
- SetCurrent();
- glViewport(0, 0, width, height);
- }
+ // the viewport must be initialized this way, not glViewport
+ // this is also necessary to update the context on some platforms
+ wxGLCanvas::OnSize(event);