From f96079f4f9b579f17ae584a3cb722f023f1c958e Mon Sep 17 00:00:00 2001 From: Sam Gateau Date: Thu, 2 Apr 2015 14:43:15 -0700 Subject: [PATCH] fixed the getViewFUrstum warning in DEBUG mode --- interface/src/Application.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index b19a7850c2..e9ef967f56 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -2615,7 +2615,12 @@ glm::vec3 Application::getSunDirection() { return skyStage->getSunLight()->getDirection(); } +// FIXME, preprocessor guard this check to occur only in DEBUG builds +static QThread * activeRenderingThread = nullptr; + void Application::updateShadowMap() { + activeRenderingThread = QThread::currentThread(); + PerformanceTimer perfTimer("shadowMap"); QOpenGLFramebufferObject* fbo = DependencyManager::get()->getShadowFramebufferObject(); fbo->bind(); @@ -2765,6 +2770,7 @@ void Application::updateShadowMap() { fbo->release(); glViewport(0, 0, _glWidget->getDeviceWidth(), _glWidget->getDeviceHeight()); + activeRenderingThread = nullptr; } const GLfloat WORLD_AMBIENT_COLOR[] = { 0.525f, 0.525f, 0.6f }; @@ -2825,9 +2831,6 @@ QImage Application::renderAvatarBillboard() { return image; } -// FIXME, preprocessor guard this check to occur only in DEBUG builds -static QThread * activeRenderingThread = nullptr; - ViewFrustum* Application::getViewFrustum() { #ifdef DEBUG if (QThread::currentThread() == activeRenderingThread) {