Added missing code for C3D_MODEL_VIEWER to use GL_CONTEXT_MANAGER.

This commit is contained in:
Maciej Suminski 2016-06-03 15:46:12 +02:00
parent 01f32dd52c
commit 94a460080e
1 changed files with 4 additions and 3 deletions

View File

@ -95,19 +95,20 @@ C3D_MODEL_VIEWER::C3D_MODEL_VIEWER( wxWindow *aParent,
m_BiuTo3Dunits = 1.0;
// Explicitly create a new rendering context instance for this canvas.
m_glRC = new wxGLContext( this );
m_glRC = GL_CONTEXT_MANAGER::Get().CreateCtx( this );
}
C3D_MODEL_VIEWER::~C3D_MODEL_VIEWER()
{
GL_CONTEXT_MANAGER::Get().LockCtx( m_glRC );
wxLogTrace( m_logTrace, wxT( "C3D_MODEL_VIEWER::~C3D_MODEL_VIEWER" ) );
delete m_ogl_3dmodel;
m_ogl_3dmodel = NULL;
delete m_glRC;
m_glRC = NULL;
GL_CONTEXT_MANAGER::Get().UnlockCtx( m_glRC );
}