]> git.saurik.com Git - wxWidgets.git/blobdiff - utils/glcanvas/samples/penguin/penguin.cpp
Added more makefiles; fixed some samples for Cygwin
[wxWidgets.git] / utils / glcanvas / samples / penguin / penguin.cpp
index e1100c508cec586d84713a31d2f2afbb7d7794fb..f4a118daa2e4903c989b63c3d27b22bf29b5eae0 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();
     
@@ -149,7 +146,9 @@ 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();