diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt index 92a3de599b..16c57e2ea2 100644 --- a/interface/CMakeLists.txt +++ b/interface/CMakeLists.txt @@ -240,7 +240,7 @@ foreach(EXTERNAL ${OPTIONAL_EXTERNALS}) if (NOT APPLE OR NOT ${${EXTERNAL}_UPPERCASE} MATCHES "SIXENSE") target_link_libraries(${TARGET_NAME} ${${${EXTERNAL}_UPPERCASE}_LIBRARIES}) elseif (APPLE AND NOT INSTALLER_BUILD) - #add_definitions(-DSIXENSE_LIB_FILENAME=\"${${${EXTERNAL}_UPPERCASE}_LIBRARY_RELEASE}\") + add_definitions(-DSIXENSE_LIB_FILENAME=\"${${${EXTERNAL}_UPPERCASE}_LIBRARY_RELEASE}\") endif () endif () endforeach() diff --git a/libraries/gl/src/gl/Context.cpp b/libraries/gl/src/gl/Context.cpp index 889aa9cef3..8acbada5aa 100644 --- a/libraries/gl/src/gl/Context.cpp +++ b/libraries/gl/src/gl/Context.cpp @@ -139,17 +139,9 @@ static void debugMessageCallback(GLenum source, GLenum type, GLuint id, GLenum s if (GL_DEBUG_SEVERITY_NOTIFICATION == severity) { return; } - qCDebug(glLogging) << "OpenGL: " << message; - - // For high severity errors, force a sync to the log, since we might crash + // FIXME For high severity errors, force a sync to the log, since we might crash // before the log file was flushed otherwise. Performance hit here - //if (GL_DEBUG_SEVERITY_HIGH == severity) { - // AbstractLoggerInterface* logger = AbstractLoggerInterface::get(); - // if (logger) { - // // FIXME find a way to force the log file to sync that doesn't lead to a deadlock - // // logger->sync(); - // } - //} + qCDebug(glLogging) << "OpenGL: " << message; } static void setupPixelFormatSimple(HDC hdc) { diff --git a/libraries/gpu-gles/src/gpu/gl/GLBackend.cpp b/libraries/gpu-gles/src/gpu/gl/GLBackend.cpp index b48deb9447..6fd5df6f81 100644 --- a/libraries/gpu-gles/src/gpu/gl/GLBackend.cpp +++ b/libraries/gpu-gles/src/gpu/gl/GLBackend.cpp @@ -224,7 +224,7 @@ void GLBackend::renderPassTransfer(const Batch& batch) { } { // Sync the transform buffers - PROFILE_RANGE(render_gpu_gl_detail, "syncGPUTransform"); + PROFILE_RANGE(render_gpu_gl_detail, "transferGPUTransform"); transferTransformState(batch); } @@ -385,21 +385,21 @@ void GLBackend::resetStages() { void GLBackend::do_pushProfileRange(const Batch& batch, size_t paramOffset) { if (trace_render_gpu_gl_detail().isDebugEnabled()) { - auto name = batch._profileRanges.get(batch._params[paramOffset]._uint); - profileRanges.push_back(name); + auto name = batch._profileRanges.get(batch._params[paramOffset]._uint); + profileRanges.push_back(name); #if defined(NSIGHT_FOUND) - nvtxRangePush(name.c_str()); + nvtxRangePush(name.c_str()); #endif -} + } } void GLBackend::do_popProfileRange(const Batch& batch, size_t paramOffset) { if (trace_render_gpu_gl_detail().isDebugEnabled()) { - profileRanges.pop_back(); + profileRanges.pop_back(); #if defined(NSIGHT_FOUND) - nvtxRangePop(); + nvtxRangePop(); #endif -} + } } // TODO: As long as we have gl calls explicitely issued from interface diff --git a/libraries/gpu-gles/src/gpu/gl/GLBackendState.cpp b/libraries/gpu-gles/src/gpu/gl/GLBackendState.cpp index 235d746317..4a5c772b8b 100644 --- a/libraries/gpu-gles/src/gpu/gl/GLBackendState.cpp +++ b/libraries/gpu-gles/src/gpu/gl/GLBackendState.cpp @@ -124,12 +124,14 @@ void GLBackend::do_setStateScissorEnable(bool enable) { void GLBackend::do_setStateMultisampleEnable(bool enable) { if (_pipeline._stateCache.multisampleEnable != enable) { - //if (enable) { - // glEnable(GL_MULTISAMPLE); - //} else { - // glDisable(GL_MULTISAMPLE); - //} +#if !defined(USE_GLES) + if (enable) { + glEnable(GL_MULTISAMPLE); + } else { + glDisable(GL_MULTISAMPLE); + } (void)CHECK_GL_ERROR(); +#endif _pipeline._stateCache.multisampleEnable = enable; } @@ -137,12 +139,14 @@ void GLBackend::do_setStateMultisampleEnable(bool enable) { void GLBackend::do_setStateAntialiasedLineEnable(bool enable) { if (_pipeline._stateCache.antialisedLineEnable != enable) { - //if (enable) { - // glEnable(GL_LINE_SMOOTH); - //} else { - // glDisable(GL_LINE_SMOOTH); - //} +#if !defined(USE_GLES) + if (enable) { + glEnable(GL_LINE_SMOOTH); + } else { + glDisable(GL_LINE_SMOOTH); + } (void)CHECK_GL_ERROR(); +#endif _pipeline._stateCache.antialisedLineEnable = enable; } @@ -152,13 +156,17 @@ void GLBackend::do_setStateDepthBias(Vec2 bias) { if ((bias.x != _pipeline._stateCache.depthBias) || (bias.y != _pipeline._stateCache.depthBiasSlopeScale)) { if ((bias.x != 0.0f) || (bias.y != 0.0f)) { glEnable(GL_POLYGON_OFFSET_FILL); - //glEnable(GL_POLYGON_OFFSET_LINE); - //glEnable(GL_POLYGON_OFFSET_POINT); +#if !defined(USE_GLES) + glEnable(GL_POLYGON_OFFSET_LINE); + glEnable(GL_POLYGON_OFFSET_POINT); +#endif glPolygonOffset(bias.x, bias.y); } else { glDisable(GL_POLYGON_OFFSET_FILL); - //glDisable(GL_POLYGON_OFFSET_LINE); - //glDisable(GL_POLYGON_OFFSET_POINT); +#if !defined(USE_GLES) + glDisable(GL_POLYGON_OFFSET_LINE); + glDisable(GL_POLYGON_OFFSET_POINT); +#endif } (void)CHECK_GL_ERROR(); diff --git a/libraries/networking/src/AddressManager.cpp b/libraries/networking/src/AddressManager.cpp index 72ebe2eb58..fa5507fcf7 100644 --- a/libraries/networking/src/AddressManager.cpp +++ b/libraries/networking/src/AddressManager.cpp @@ -105,7 +105,7 @@ QUrl AddressManager::currentFacingShareableAddress() const { void AddressManager::loadSettings(const QString& lookupString) { if (lookupString.isEmpty()) { - handleUrl(DEFAULT_HIFI_ADDRESS, LookupTrigger::StartupFromSettings); + handleUrl(currentAddressHandle.get(), LookupTrigger::StartupFromSettings); } else { handleUrl(lookupString, LookupTrigger::StartupFromSettings); } diff --git a/libraries/render-utils/src/Fade.slh b/libraries/render-utils/src/Fade.slh index 4bbca70b83..a06c8c869e 100644 --- a/libraries/render-utils/src/Fade.slh +++ b/libraries/render-utils/src/Fade.slh @@ -102,7 +102,7 @@ void applyFade(FadeObjectParams params, vec3 position, out vec3 emissive) { float edgeMask = alpha * fadeParameters[params.category]._edgeWidthInvWidth.y; float edgeAlpha = 1.0-clamp(edgeMask, 0.0, 1.0); - edgeMask = step(edgeMask, 1.f); + edgeMask = step(edgeMask, 1.0); edgeAlpha *= edgeAlpha; // Square to have a nice ease out vec4 color = mix(fadeParameters[params.category]._innerEdgeColor, fadeParameters[params.category]._outerEdgeColor, edgeAlpha); emissive = color.rgb * edgeMask * color.a; diff --git a/libraries/shared/src/PathUtils.cpp b/libraries/shared/src/PathUtils.cpp index de3708bd81..35d7554f39 100644 --- a/libraries/shared/src/PathUtils.cpp +++ b/libraries/shared/src/PathUtils.cpp @@ -271,31 +271,3 @@ bool PathUtils::isDescendantOf(const QUrl& childURL, const QUrl& parentURL) { QString parent = stripFilename(parentURL); return child.startsWith(parent, PathUtils::getFSCaseSensitivity()); } - -void PathUtils::copyDirDeep(QString src, QString dst) { - QDir dir = QDir::root(); - dir.mkpath(dst); - QDirIterator it(src, QStringList() << "*", QDir::Files|QDir::AllDirs, QDirIterator::Subdirectories); - while (it.hasNext()) { - QString f = it.next(); - QFileInfo fInfo(f); - QString newDst = dst + (dst.endsWith("/")?"":"/") + fInfo.fileName(); - if (fInfo.isFile()) { - QFile dfile(f); - if (dfile.exists(f)) - { - if (dfile.copy(newDst)) { - QFile::setPermissions(newDst, QFile::ReadOwner); - } else { - QFile::setPermissions(newDst, QFile::ReadOwner); - // sometimes copy returns false but it worked anyway - //qWarning() << "Could not copy to " << newDst; - } - } - } else if (fInfo.isDir() ) { - copyDirDeep(f, newDst); - } - } -} - - diff --git a/libraries/shared/src/PathUtils.h b/libraries/shared/src/PathUtils.h index fa366ad9b7..ec71ccee6a 100644 --- a/libraries/shared/src/PathUtils.h +++ b/libraries/shared/src/PathUtils.h @@ -57,8 +57,6 @@ public: // note: this is FS-case-sensitive version of parentURL.isParentOf(childURL) static bool isDescendantOf(const QUrl& childURL, const QUrl& parentURL); static QUrl defaultScriptsLocation(const QString& newDefault = ""); - static void copyDirDeep(QString src, QString dst); - }; QString fileNameWithoutExtension(const QString& fileName, const QVector possibleExtensions); diff --git a/tests/gl/src/main.cpp b/tests/gl/src/main.cpp index beb0367610..7435c8c2bf 100644 --- a/tests/gl/src/main.cpp +++ b/tests/gl/src/main.cpp @@ -28,7 +28,7 @@ int main(int argc, char** argv) { if (!window->makeCurrent()) { throw std::runtime_error("Failed"); } - glClearColor(1.0, 0.0, 1.0, 1.0); + glClearColor(1.0f, 0.0f, 1.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT); window->swapBuffers(); window->doneCurrent();