Commit c05d0c3d authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Fixed test-campvis:

Registered testing thread and OpenGL context with OpenGLJobProcessor.
parent 8715f2d8
......@@ -258,6 +258,10 @@ namespace campvis {
return std::this_thread::get_id() == _this_thread_id;
}
void OpenGLJobProcessor::iKnowWhatImDoingSetOpenGlThread() {
_this_thread_id = std::this_thread::get_id();
}
}
......
......@@ -152,6 +152,13 @@ namespace campvis {
*/
tgt::GLCanvas* iKnowWhatImDoingGetArbitraryContext();
/**
* Sets the OpenGL thread to the calling thread.
* \note You can do really messy things with this. Do not use this method unless
* you know what you're doing and know that there is no other way...
*/
void iKnowWhatImDoingSetOpenGlThread();
/**
* Checks whether calling thread is OpenGL thread.
* \return std::this_thread::get_id() == _this_thread_id
......
......@@ -79,6 +79,8 @@ void init() {
tgt::GLContextScopedLock lock(_localContext);
tgt::GlContextManager::getRef().registerContextAndInitGlew(_localContext);
GLJobProc.iKnowWhatImDoingSetOpenGlThread();
GLJobProc.registerContext(_localContext);
tgt::initGL(featureset);
ShdrMgr.setDefaultGlslVersion("330");
......
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