// 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
void TestGLCanvas::LoadDXF(const wxString& filename)
{
wxFileInputStream stream(filename);
- if (stream.Ok())
+ if (stream.IsOk())
#if wxUSE_ZLIB
{
if (filename.Right(3).Lower() == wxT(".gz"))
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);