Added call to State::initializeExtensionsProcs() to prevent crashes before
these variables are initialized.
This commit is contained in:
@@ -431,6 +431,10 @@ bool GraphicsContext::makeCurrent()
|
||||
if (result)
|
||||
{
|
||||
_threadOfLastMakeCurrent = OpenThreads::Thread::CurrentThread();
|
||||
|
||||
// initialize extension proces, not only initializes on first
|
||||
// call, will be a non-op on subsequent calls.
|
||||
getState()->initializeExtensionProcs();
|
||||
}
|
||||
|
||||
return result;
|
||||
@@ -443,6 +447,10 @@ bool GraphicsContext::makeContextCurrent(GraphicsContext* readContext)
|
||||
if (result)
|
||||
{
|
||||
_threadOfLastMakeCurrent = OpenThreads::Thread::CurrentThread();
|
||||
|
||||
// initialize extension proces, not only initializes on first
|
||||
// call, will be a non-op on subsequent calls.
|
||||
getState()->initializeExtensionProcs();
|
||||
}
|
||||
|
||||
return result;
|
||||
|
||||
@@ -30,6 +30,8 @@ void GraphicsThread::run()
|
||||
if (graphicsContext)
|
||||
{
|
||||
graphicsContext->makeCurrent();
|
||||
|
||||
graphicsContext->getState()->initializeExtensionProcs();
|
||||
}
|
||||
|
||||
OperationThread::run();
|
||||
|
||||
Reference in New Issue
Block a user