diff --git a/cmake/modules/FindOpenVR.cmake b/cmake/modules/FindOpenVR.cmake index 9104fc514f..9cbe790a7f 100644 --- a/cmake/modules/FindOpenVR.cmake +++ b/cmake/modules/FindOpenVR.cmake @@ -13,12 +13,9 @@ # See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html # - if (NOT ANDROID) - include(FindPackageHandleStandardArgs) find_package_handle_standard_args(OPENVR DEFAULT_MSG OPENVR_INCLUDE_DIRS OPENVR_LIBRARIES) - -endif (NOT ANDROID) +endif() mark_as_advanced(OPENVR_INCLUDE_DIRS OPENVR_LIBRARIES OPENVR_SEARCH_DIRS) diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 84079dc3b4..66bb02bbca 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -73,7 +73,6 @@ find_package(Qt5 COMPONENTS Gui Multimedia Network OpenGL Qml Quick Script Svg W # grab the ui files in resources/ui file (GLOB_RECURSE QT_UI_FILES ui/*.ui) source_group("UI Files" FILES ${QT_UI_FILES}) - # have qt5 wrap them and generate the appropriate header files qt5_wrap_ui(QT_UI_HEADERS "${QT_UI_FILES}") diff --git a/interface/src/audio/AudioToolBox.cpp b/interface/src/audio/AudioToolBox.cpp index 5f70fbda00..85b8b19788 100644 --- a/interface/src/audio/AudioToolBox.cpp +++ b/interface/src/audio/AudioToolBox.cpp @@ -111,4 +111,4 @@ void AudioToolBox::render(int x, int y, int padding, bool boxed) { DependencyManager::get()->renderQuad(topLeft, bottomRight, texCoordTopLeft, texCoordBottomRight, quadColor, _boxQuadID); glBindTexture(GL_TEXTURE_2D, 0); glDisable(GL_TEXTURE_2D); -} +} \ No newline at end of file diff --git a/interface/src/audio/AudioToolBox.h b/interface/src/audio/AudioToolBox.h index 8957037482..e07e6857aa 100644 --- a/interface/src/audio/AudioToolBox.h +++ b/interface/src/audio/AudioToolBox.h @@ -33,4 +33,4 @@ private: qint64 _iconPulseTimeReference = 0; }; -#endif // hifi_AudioToolBox_h +#endif // hifi_AudioToolBox_h \ No newline at end of file diff --git a/libraries/render-utils/src/DeferredLightingEffect.cpp b/libraries/render-utils/src/DeferredLightingEffect.cpp index 324ed69a96..bddb1815bf 100644 --- a/libraries/render-utils/src/DeferredLightingEffect.cpp +++ b/libraries/render-utils/src/DeferredLightingEffect.cpp @@ -268,16 +268,16 @@ void DeferredLightingEffect::render() { program->setUniformValue(locations->ambientSphere + i, *(((QVector4D*) &sh) + i)); } } - - if (locations->lightBufferUnit >= 0) { - gpu::Batch batch; - batch.setUniformBuffer(locations->lightBufferUnit, globalLight->getSchemaBuffer()); - gpu::GLBackend::renderBatch(batch); + + if (locations->lightBufferUnit >= 0) { + gpu::Batch batch; + batch.setUniformBuffer(locations->lightBufferUnit, globalLight->getSchemaBuffer()); + gpu::GLBackend::renderBatch(batch); } if (_atmosphere && (locations->atmosphereBufferUnit >= 0)) { - gpu::Batch batch; - batch.setUniformBuffer(locations->atmosphereBufferUnit, _atmosphere->getDataBuffer()); + gpu::Batch batch; + batch.setUniformBuffer(locations->atmosphereBufferUnit, _atmosphere->getDataBuffer()); gpu::GLBackend::renderBatch(batch); } glUniformMatrix4fv(locations->invViewMat, 1, false, reinterpret_cast< const GLfloat* >(&invViewMat)); @@ -334,11 +334,11 @@ void DeferredLightingEffect::render() { for (auto lightID : _pointLights) { auto light = _allocatedLights[lightID]; - - if (_pointLightLocations.lightBufferUnit >= 0) { - gpu::Batch batch; - batch.setUniformBuffer(_pointLightLocations.lightBufferUnit, light->getSchemaBuffer()); - gpu::GLBackend::renderBatch(batch); + + if (_pointLightLocations.lightBufferUnit >= 0) { + gpu::Batch batch; + batch.setUniformBuffer(_pointLightLocations.lightBufferUnit, light->getSchemaBuffer()); + gpu::GLBackend::renderBatch(batch); } glUniformMatrix4fv(_pointLightLocations.invViewMat, 1, false, reinterpret_cast< const GLfloat* >(&invViewMat)); @@ -380,10 +380,10 @@ void DeferredLightingEffect::render() { for (auto lightID : _spotLights) { auto light = _allocatedLights[lightID]; - if (_spotLightLocations.lightBufferUnit >= 0) { - gpu::Batch batch; - batch.setUniformBuffer(_spotLightLocations.lightBufferUnit, light->getSchemaBuffer()); - gpu::GLBackend::renderBatch(batch); + if (_spotLightLocations.lightBufferUnit >= 0) { + gpu::Batch batch; + batch.setUniformBuffer(_spotLightLocations.lightBufferUnit, light->getSchemaBuffer()); + gpu::GLBackend::renderBatch(batch); } glUniformMatrix4fv(_spotLightLocations.invViewMat, 1, false, reinterpret_cast< const GLfloat* >(&invViewMat)); @@ -482,8 +482,6 @@ void DeferredLightingEffect::render() { } void DeferredLightingEffect::loadLightProgram(const char* fragSource, bool limited, ProgramObject& program, LightLocations& locations) { - qDebug() << (limited ? deferred_light_limited_vert : deferred_light_vert); - qDebug() << fragSource; program.addShaderFromSourceCode(QGLShader::Vertex, (limited ? deferred_light_limited_vert : deferred_light_vert)); program.addShaderFromSourceCode(QGLShader::Fragment, fragSource); program.link(); @@ -504,42 +502,42 @@ void DeferredLightingEffect::loadLightProgram(const char* fragSource, bool limit locations.ambientSphere = program.uniformLocation("ambientSphere.L00"); locations.invViewMat = program.uniformLocation("invViewMat"); - GLint loc = -1; - -#if (GPU_FEATURE_PROFILE == GPU_CORE) - const GLint LIGHT_GPU_SLOT = 3; - loc = glGetUniformBlockIndex(program.programId(), "lightBuffer"); - if (loc >= 0) { - glUniformBlockBinding(program.programId(), loc, LIGHT_GPU_SLOT); - locations.lightBufferUnit = LIGHT_GPU_SLOT; - } else { - locations.lightBufferUnit = -1; - } -#else - loc = program.uniformLocation("lightBuffer"); - if (loc >= 0) { - locations.lightBufferUnit = loc; - } else { - locations.lightBufferUnit = -1; - } + GLint loc = -1; + +#if (GPU_FEATURE_PROFILE == GPU_CORE) + const GLint LIGHT_GPU_SLOT = 3; + loc = glGetUniformBlockIndex(program.programId(), "lightBuffer"); + if (loc >= 0) { + glUniformBlockBinding(program.programId(), loc, LIGHT_GPU_SLOT); + locations.lightBufferUnit = LIGHT_GPU_SLOT; + } else { + locations.lightBufferUnit = -1; + } +#else + loc = program.uniformLocation("lightBuffer"); + if (loc >= 0) { + locations.lightBufferUnit = loc; + } else { + locations.lightBufferUnit = -1; + } #endif -#if (GPU_FEATURE_PROFILE == GPU_CORE) - const GLint ATMOSPHERE_GPU_SLOT = 4; - loc = glGetUniformBlockIndex(program.programId(), "atmosphereBufferUnit"); - if (loc >= 0) { - glUniformBlockBinding(program.programId(), loc, ATMOSPHERE_GPU_SLOT); - locations.atmosphereBufferUnit = ATMOSPHERE_GPU_SLOT; - } else { - locations.atmosphereBufferUnit = -1; - } -#else - loc = program.uniformLocation("atmosphereBufferUnit"); - if (loc >= 0) { - locations.atmosphereBufferUnit = loc; - } else { - locations.atmosphereBufferUnit = -1; - } +#if (GPU_FEATURE_PROFILE == GPU_CORE) + const GLint ATMOSPHERE_GPU_SLOT = 4; + loc = glGetUniformBlockIndex(program.programId(), "atmosphereBufferUnit"); + if (loc >= 0) { + glUniformBlockBinding(program.programId(), loc, ATMOSPHERE_GPU_SLOT); + locations.atmosphereBufferUnit = ATMOSPHERE_GPU_SLOT; + } else { + locations.atmosphereBufferUnit = -1; + } +#else + loc = program.uniformLocation("atmosphereBufferUnit"); + if (loc >= 0) { + locations.atmosphereBufferUnit = loc; + } else { + locations.atmosphereBufferUnit = -1; + } #endif program.release();