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"));
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"));
// 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
static const GLfloat light1_color[4] = { 0.4f, 0.4f, 1.0f, 1.0f };
/* remove back faces */
- glDisable(GL_CULL_FACE);
+ glEnable(GL_CULL_FACE);
glEnable(GL_DEPTH_TEST);
/* speedups */
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);