]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/glcanvas/samples/penguin/penguin.cpp
Since wxPanel is now AutoLayout aware, removed indirect auto layouting
[wxWidgets.git] / utils / glcanvas / samples / penguin / penguin.cpp
index e1100c508cec586d84713a31d2f2afbb7d7794fb..8eaed6a1d9bd74fb9361e90604628e42da3190fd 100644 (file)
@@ -76,11 +76,6 @@ void MyFrame::OnExit(wxCommandEvent& event)
     Destroy();
 }
 
-bool MyFrame::OnClose(void)
-{
-    return TRUE;
-}
-
 BEGIN_EVENT_TABLE(TestGLCanvas, wxGLCanvas)
     EVT_SIZE(TestGLCanvas::OnSize)
     EVT_PAINT(TestGLCanvas::OnPaint)
@@ -106,7 +101,9 @@ void TestGLCanvas::OnPaint( wxPaintEvent& event )
     /* must always be here */
     wxPaintDC dc(this);
 
+#ifndef __WXMOTIF__
     if (!GetContext()) return;
+#endif
 
     SetCurrent();
     
@@ -148,8 +145,10 @@ void TestGLCanvas::OnSize(wxSizeEvent& event)
 {
     int width, height;
     GetClientSize(& width, & height);
-
+    
+#ifndef __WXMOTIF__
     if (GetContext())
+#endif
     {
         SetCurrent();
         glViewport(0, 0, width, height);
@@ -197,7 +196,7 @@ void TestGLCanvas::OnMouse( wxMouseEvent& event )
         add_quats( spin_quat, info.quat, info.quat );
        
         /* orientation has changed, redraw mesh */
-       Refresh();
+       Refresh(FALSE);
     }
     
     info.beginx = event.GetX();