]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/opengl/penguin/penguin.cpp
Remove assert checking bitmap size in wxMenuItem drawing code in wxMSW.
[wxWidgets.git] / samples / opengl / penguin / penguin.cpp
index a50f6dfd4d10227e6517607f5028100a55b8825c..b461b79df0f97359badee67f8f80f93b8b07d958 100644 (file)
@@ -87,7 +87,7 @@ MyFrame::MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos,
     fileMenu->Append(wxID_EXIT, wxT("E&xit\tALT-X"));
     // Make the "Help" menu
     wxMenu *helpMenu = new wxMenu;
-    helpMenu->Append(wxID_HELP, wxT("&About..."));
+    helpMenu->Append(wxID_HELP, wxT("&About"));
 
     wxMenuBar *menuBar = new wxMenuBar;
     menuBar->Append(fileMenu, wxT("&File"));
@@ -124,7 +124,7 @@ void MyFrame::OnMenuFileExit( wxCommandEvent& WXUNUSED(event) )
     Close(true);
 }
 
-// Help|About... command
+// Help|About command
 void MyFrame::OnMenuHelpAbout( wxCommandEvent& WXUNUSED(event) )
 {
     wxMessageBox(wxT("OpenGL Penguin Sample (c) Robert Roebling, Sandro Sigala et al"));
@@ -153,9 +153,6 @@ TestGLCanvas::TestGLCanvas(wxWindow *parent,
     // Explicitly create a new rendering context instance for this canvas.
     m_glRC = new wxGLContext(this);
 
-    // Make the new context current (activate it for use) with this canvas.
-    SetCurrent(*m_glRC);
-
     m_gldata.initialized = false;
 
     // initialize view matrix
@@ -303,6 +300,9 @@ void TestGLCanvas::InitGL()
 
 void TestGLCanvas::ResetProjectionMode()
 {
+    if ( !IsShownOnScreen() )
+        return;
+
     // This is normally only necessary if there is more than one wxGLCanvas
     // or more than one wxGLContext in the application.
     SetCurrent(*m_glRC);