Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CAMP
campvis-public
Commits
c05d0c3d
Commit
c05d0c3d
authored
Aug 13, 2014
by
Christian Schulte zu Berge
Browse files
Fixed test-campvis:
Registered testing thread and OpenGL context with OpenGLJobProcessor.
parent
8715f2d8
Changes
3
Hide whitespace changes
Inline
Side-by-side
core/tools/opengljobprocessor.cpp
View file @
c05d0c3d
...
...
@@ -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
();
}
}
...
...
core/tools/opengljobprocessor.h
View file @
c05d0c3d
...
...
@@ -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
...
...
test/main.cpp
View file @
c05d0c3d
...
...
@@ -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"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment