Commit c7bc1e15 authored by Maciej Suminski's avatar Maciej Suminski

GAL is not activated by default. Late OpenGL backend initializatization.

parent bd03ca1f
...@@ -52,11 +52,10 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener, ...@@ -52,11 +52,10 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener,
nonCachedManager( false ), nonCachedManager( false ),
overlayManager( false ) overlayManager( false )
{ {
// Create the OpenGL-Context
glContext = new wxGLContext( this );
parentWindow = aParent; parentWindow = aParent;
mouseListener = aMouseListener; mouseListener = aMouseListener;
paintListener = aPaintListener; paintListener = aPaintListener;
glContext = NULL;
// Initialize the flags // Initialize the flags
isGlewInitialized = false; isGlewInitialized = false;
...@@ -113,6 +112,9 @@ OPENGL_GAL::~OPENGL_GAL() ...@@ -113,6 +112,9 @@ OPENGL_GAL::~OPENGL_GAL()
void OPENGL_GAL::BeginDrawing() void OPENGL_GAL::BeginDrawing()
{ {
if( !glContext )
glContext = new wxGLContext( this );
SetCurrent( *glContext ); SetCurrent( *glContext );
clientDC = new wxClientDC( this ); clientDC = new wxClientDC( this );
......
...@@ -293,9 +293,6 @@ bool EDA_APP::OnInit() ...@@ -293,9 +293,6 @@ bool EDA_APP::OnInit()
frame->SetFocus(); frame->SetFocus();
frame->GetCanvas()->SetFocus(); frame->GetCanvas()->SetFocus();
// Activate the GAL
frame->UseGalCanvas( true );
return true; return true;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment