diff --git a/android/app/src/main/cpp/renderer.cpp b/android/app/src/main/cpp/renderer.cpp index 9c9c9f8b52..27e4a7d882 100644 --- a/android/app/src/main/cpp/renderer.cpp +++ b/android/app/src/main/cpp/renderer.cpp @@ -147,6 +147,7 @@ static void CheckGLError(const char* label) { } // Contains vertex, normal and other data. +#if 0 namespace cube { const std::array CUBE_COORDS{{ // Front face @@ -298,6 +299,7 @@ namespace cube { 0.0f, -1.0f, 0.0f }}; } +#endif namespace triangle { static std::array TRIANGLE_VERTS {{ diff --git a/libraries/entities/src/EntityEditFilters.cpp b/libraries/entities/src/EntityEditFilters.cpp index 5359ebd31b..550c8f17c4 100644 --- a/libraries/entities/src/EntityEditFilters.cpp +++ b/libraries/entities/src/EntityEditFilters.cpp @@ -199,7 +199,7 @@ void EntityEditFilters::scriptRequestFinished(EntityItemID entityID) { // define the uncaughtException function QScriptEngine& engineRef = *engine; - filterData.uncaughtExceptions = [this, &engineRef, urlString]() { return hadUncaughtExceptions(engineRef, urlString); }; + filterData.uncaughtExceptions = [&engineRef, urlString]() { return hadUncaughtExceptions(engineRef, urlString); }; // now get the filter function auto global = engine->globalObject(); diff --git a/libraries/gpu-gles/src/gpu/gl/GLBackend.cpp b/libraries/gpu-gles/src/gpu/gl/GLBackend.cpp index 1d66618703..cb00d00b3e 100644 --- a/libraries/gpu-gles/src/gpu/gl/GLBackend.cpp +++ b/libraries/gpu-gles/src/gpu/gl/GLBackend.cpp @@ -37,7 +37,7 @@ static const char* GL_BACKEND_PROPERTY_NAME = "com.highfidelity.gl.backend"; BackendPointer GLBackend::createBackend() { // FIXME provide a mechanism to override the backend for testing // Where the gpuContext is initialized and where the TRUE Backend is created and assigned - auto version = QOpenGLContextWrapper::currentContextVersion(); + //auto version = QOpenGLContextWrapper::currentContextVersion(); std::shared_ptr result; qDebug() << "Using OpenGL ES backend"; diff --git a/libraries/gpu-gles/src/gpu/gl/GLBackendQuery.cpp b/libraries/gpu-gles/src/gpu/gl/GLBackendQuery.cpp index 530e01d8ff..e5126bb3df 100644 --- a/libraries/gpu-gles/src/gpu/gl/GLBackendQuery.cpp +++ b/libraries/gpu-gles/src/gpu/gl/GLBackendQuery.cpp @@ -17,10 +17,10 @@ using namespace gpu::gl; // Eventually, we want to test with TIME_ELAPSED instead of TIMESTAMP #ifdef Q_OS_MAC -const uint32_t MAX_RANGE_QUERY_DEPTH = 1; +//const uint32_t MAX_RANGE_QUERY_DEPTH = 1; static bool timeElapsed = true; #else -const uint32_t MAX_RANGE_QUERY_DEPTH = 10000; +//const uint32_t MAX_RANGE_QUERY_DEPTH = 10000; static bool timeElapsed = false; #endif diff --git a/libraries/gpu-gles/src/gpu/gl/GLBackendState.cpp b/libraries/gpu-gles/src/gpu/gl/GLBackendState.cpp index 27b8d23bf3..0a7db78b11 100644 --- a/libraries/gpu-gles/src/gpu/gl/GLBackendState.cpp +++ b/libraries/gpu-gles/src/gpu/gl/GLBackendState.cpp @@ -56,11 +56,11 @@ void GLBackend::syncPipelineStateCache() { void GLBackend::do_setStateFillMode(int32 mode) { if (_pipeline._stateCache.fillMode != mode) { - static GLenum GL_FILL_MODES[] = { /*GL_POINT, GL_LINE, GL_FILL*/ }; + //static GLenum GL_FILL_MODES[] = { /*GL_POINT, GL_LINE, GL_FILL*/ }; + //glPolygonMode(GL_FRONT_AND_BACK, GL_FILL_MODES[mode]); qDebug() << "TODO: GLBackendState.cpp:do_setStateFillMode GL_POINT"; qDebug() << "TODO: GLBackendState.cpp:do_setStateFillMode GL_LINE"; qDebug() << "TODO: GLBackendState.cpp:do_setStateFillMode GL_FILL"; - //glPolygonMode(GL_FRONT_AND_BACK, GL_FILL_MODES[mode]); qDebug() << "TODO: GLBackendState.cpp:do_setStateFillMode glPolygonMode"; (void)CHECK_GL_ERROR(); diff --git a/libraries/gpu-gles/src/gpu/gl/GLTexelFormat.cpp b/libraries/gpu-gles/src/gpu/gl/GLTexelFormat.cpp index 6eec4b5292..9808d389f1 100644 --- a/libraries/gpu-gles/src/gpu/gl/GLTexelFormat.cpp +++ b/libraries/gpu-gles/src/gpu/gl/GLTexelFormat.cpp @@ -178,6 +178,10 @@ GLenum GLTexelFormat::evalGLTexelFormatInternal(const gpu::Element& dstFormat) { case gpu::NINT8: result = GL_RGBA8_SNORM; break; + case gpu::COMPRESSED: + case gpu::NUINT2: + case gpu::NINT16: + case gpu::NUINT16: case gpu::NUINT32: case gpu::NINT32: case gpu::NUM_TYPES: // quiet compiler @@ -446,6 +450,8 @@ GLTexelFormat GLTexelFormat::evalGLTexelFormat(const Element& dstFormat, const E texel.internalFormat = GL_R8_SNORM; break; } + case gpu::COMPRESSED: + case gpu::NUINT2: case gpu::NUM_TYPES: { // quiet compiler Q_UNREACHABLE(); } @@ -489,6 +495,8 @@ GLTexelFormat GLTexelFormat::evalGLTexelFormat(const Element& dstFormat, const E texel.internalFormat = GL_DEPTH_COMPONENT24; break; } + case gpu::COMPRESSED: + case gpu::NUINT2: case gpu::NUM_TYPES: { // quiet compiler Q_UNREACHABLE(); } @@ -614,6 +622,8 @@ GLTexelFormat GLTexelFormat::evalGLTexelFormat(const Element& dstFormat, const E break; case gpu::NUINT32: case gpu::NINT32: + case gpu::COMPRESSED: + case gpu::NUINT2: case gpu::NUM_TYPES: // quiet compiler Q_UNREACHABLE(); } diff --git a/libraries/gpu-gles/src/gpu/gles/GLESBackend.cpp b/libraries/gpu-gles/src/gpu/gles/GLESBackend.cpp index 8c843c1ce3..b277889771 100644 --- a/libraries/gpu-gles/src/gpu/gles/GLESBackend.cpp +++ b/libraries/gpu-gles/src/gpu/gles/GLESBackend.cpp @@ -166,8 +166,7 @@ void GLESBackend::do_drawIndexedInstanced(const Batch& batch, size_t paramOffset void GLESBackend::do_multiDrawIndirect(const Batch& batch, size_t paramOffset) { #if (GPU_INPUT_PROFILE == GPU_CORE_43) uint commandCount = batch._params[paramOffset + 0]._uint; - GLenum mode = gl::PRIMITIVE_TO_GL[(Primitive)batch._params[paramOffset + 1]._uint]; - + //GLenum mode = gl::PRIMITIVE_TO_GL[(Primitive)batch._params[paramOffset + 1]._uint]; //glMultiDrawArraysIndirect(mode, reinterpret_cast(_input._indirectBufferOffset), commandCount, (GLsizei)_input._indirectBufferStride); qDebug() << "TODO: GLESBackend.cpp:do_multiDrawIndirect do_multiDrawIndirect"; _stats._DSNumDrawcalls += commandCount; @@ -183,9 +182,8 @@ void GLESBackend::do_multiDrawIndirect(const Batch& batch, size_t paramOffset) { void GLESBackend::do_multiDrawIndexedIndirect(const Batch& batch, size_t paramOffset) { //#if (GPU_INPUT_PROFILE == GPU_CORE_43) uint commandCount = batch._params[paramOffset + 0]._uint; - GLenum mode = gl::PRIMITIVE_TO_GL[(Primitive)batch._params[paramOffset + 1]._uint]; - GLenum indexType = gl::ELEMENT_TYPE_TO_GL[_input._indexBufferType]; - + //GLenum mode = gl::PRIMITIVE_TO_GL[(Primitive)batch._params[paramOffset + 1]._uint]; + //GLenum indexType = gl::ELEMENT_TYPE_TO_GL[_input._indexBufferType]; //glMultiDrawElementsIndirect(mode, indexType, reinterpret_cast(_input._indirectBufferOffset), commandCount, (GLsizei)_input._indirectBufferStride); qDebug() << "TODO: GLESBackend.cpp:do_multiDrawIndexedIndirect glMultiDrawElementsIndirect"; _stats._DSNumDrawcalls += commandCount; diff --git a/libraries/gpu-gles/src/gpu/gles/GLESBackendOutput.cpp b/libraries/gpu-gles/src/gpu/gles/GLESBackendOutput.cpp index 8bf9267fde..7dab3bc684 100644 --- a/libraries/gpu-gles/src/gpu/gles/GLESBackendOutput.cpp +++ b/libraries/gpu-gles/src/gpu/gles/GLESBackendOutput.cpp @@ -99,7 +99,8 @@ public: if (!_colorBuffers.empty()) { glDrawBuffers((GLsizei)_colorBuffers.size(), _colorBuffers.data()); } else { - glDrawBuffers(1, {GL_NONE}); + static const std::vector NO_BUFFERS{ GL_NONE }; + glDrawBuffers((GLsizei)NO_BUFFERS.size(), NO_BUFFERS.data()); } // Now check for completness diff --git a/libraries/render-utils/src/CauterizedModel.cpp b/libraries/render-utils/src/CauterizedModel.cpp index 30121a232d..c437a8c556 100644 --- a/libraries/render-utils/src/CauterizedModel.cpp +++ b/libraries/render-utils/src/CauterizedModel.cpp @@ -211,6 +211,6 @@ void CauterizedModel::updateRenderItems() { } const Model::MeshState& CauterizedModel::getCauterizeMeshState(int index) const { - assert(index < _meshStates.size()); + assert((size_t)index < _meshStates.size()); return _cauterizeMeshStates.at(index); } diff --git a/libraries/render-utils/src/LightStage.cpp b/libraries/render-utils/src/LightStage.cpp index ba705e56cb..bf2dce85e8 100644 --- a/libraries/render-utils/src/LightStage.cpp +++ b/libraries/render-utils/src/LightStage.cpp @@ -180,7 +180,7 @@ LightStage::LightPointer LightStage::removeLight(Index index) { _lightMap.erase(removedLight); _descs[index] = Desc(); } - assert(_descs.size() <= index || _descs[index].shadowId == INVALID_INDEX); + assert(_descs.size() <= (size_t)index || _descs[index].shadowId == INVALID_INDEX); return removedLight; }