Added call to State::initializeExtensionsProcs() to prevent crashes before

these variables are initialized.
This commit is contained in:
Robert Osfield
2007-07-18 14:54:27 +00:00
parent da95b907f1
commit de69a4a3d8
2 changed files with 10 additions and 0 deletions

View File

@@ -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;

View File

@@ -30,6 +30,8 @@ void GraphicsThread::run()
if (graphicsContext)
{
graphicsContext->makeCurrent();
graphicsContext->getState()->initializeExtensionProcs();
}
OperationThread::run();