mirror of
https://github.com/overte-org/overte.git
synced 2025-08-16 19:54:05 +02:00
Adding some fixmes to the code, since globals are evil and such checks should be confined to debug mode only
This commit is contained in:
parent
e616308911
commit
1662230289
1 changed files with 3 additions and 1 deletions
|
@ -2795,11 +2795,12 @@ QImage Application::renderAvatarBillboard() {
|
|||
return image;
|
||||
}
|
||||
|
||||
|
||||
// FIXME, preprocessor guard this check to occur only in DEBUG builds
|
||||
static QThread * activeRenderingThread = nullptr;
|
||||
|
||||
ViewFrustum* Application::getViewFrustum() {
|
||||
if (QThread::currentThread() == activeRenderingThread) {
|
||||
// FIXME, should this be an assert?
|
||||
qWarning() << "Calling Application::getViewFrustum() from the active rendering thread, did you mean Application::getDisplayViewFrustum()?";
|
||||
}
|
||||
return &_viewFrustum;
|
||||
|
@ -2807,6 +2808,7 @@ ViewFrustum* Application::getViewFrustum() {
|
|||
|
||||
ViewFrustum* Application::getDisplayViewFrustum() {
|
||||
if (QThread::currentThread() != activeRenderingThread) {
|
||||
// FIXME, should this be an assert?
|
||||
qWarning() << "Calling Application::getDisplayViewFrustum() from outside the active rendering thread or outside rendering, did you mean Application::getViewFrustum()?";
|
||||
}
|
||||
return &_displayViewFrustum;
|
||||
|
|
Loading…
Reference in a new issue