mirror of
https://github.com/overte-org/overte.git
synced 2025-04-14 07:47:30 +02:00
Fixing warnings in android build
This commit is contained in:
parent
5febbc32f5
commit
e4220aa44e
10 changed files with 25 additions and 14 deletions
|
@ -147,6 +147,7 @@ static void CheckGLError(const char* label) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Contains vertex, normal and other data.
|
// Contains vertex, normal and other data.
|
||||||
|
#if 0
|
||||||
namespace cube {
|
namespace cube {
|
||||||
const std::array<float, 108> CUBE_COORDS{{
|
const std::array<float, 108> CUBE_COORDS{{
|
||||||
// Front face
|
// Front face
|
||||||
|
@ -298,6 +299,7 @@ namespace cube {
|
||||||
0.0f, -1.0f, 0.0f
|
0.0f, -1.0f, 0.0f
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace triangle {
|
namespace triangle {
|
||||||
static std::array<float, 9> TRIANGLE_VERTS {{
|
static std::array<float, 9> TRIANGLE_VERTS {{
|
||||||
|
|
|
@ -199,7 +199,7 @@ void EntityEditFilters::scriptRequestFinished(EntityItemID entityID) {
|
||||||
|
|
||||||
// define the uncaughtException function
|
// define the uncaughtException function
|
||||||
QScriptEngine& engineRef = *engine;
|
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
|
// now get the filter function
|
||||||
auto global = engine->globalObject();
|
auto global = engine->globalObject();
|
||||||
|
|
|
@ -37,7 +37,7 @@ static const char* GL_BACKEND_PROPERTY_NAME = "com.highfidelity.gl.backend";
|
||||||
BackendPointer GLBackend::createBackend() {
|
BackendPointer GLBackend::createBackend() {
|
||||||
// FIXME provide a mechanism to override the backend for testing
|
// FIXME provide a mechanism to override the backend for testing
|
||||||
// Where the gpuContext is initialized and where the TRUE Backend is created and assigned
|
// 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<GLBackend> result;
|
std::shared_ptr<GLBackend> result;
|
||||||
|
|
||||||
qDebug() << "Using OpenGL ES backend";
|
qDebug() << "Using OpenGL ES backend";
|
||||||
|
|
|
@ -17,10 +17,10 @@ using namespace gpu::gl;
|
||||||
|
|
||||||
// Eventually, we want to test with TIME_ELAPSED instead of TIMESTAMP
|
// Eventually, we want to test with TIME_ELAPSED instead of TIMESTAMP
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
const uint32_t MAX_RANGE_QUERY_DEPTH = 1;
|
//const uint32_t MAX_RANGE_QUERY_DEPTH = 1;
|
||||||
static bool timeElapsed = true;
|
static bool timeElapsed = true;
|
||||||
#else
|
#else
|
||||||
const uint32_t MAX_RANGE_QUERY_DEPTH = 10000;
|
//const uint32_t MAX_RANGE_QUERY_DEPTH = 10000;
|
||||||
static bool timeElapsed = false;
|
static bool timeElapsed = false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -56,11 +56,11 @@ void GLBackend::syncPipelineStateCache() {
|
||||||
|
|
||||||
void GLBackend::do_setStateFillMode(int32 mode) {
|
void GLBackend::do_setStateFillMode(int32 mode) {
|
||||||
if (_pipeline._stateCache.fillMode != 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_POINT";
|
||||||
qDebug() << "TODO: GLBackendState.cpp:do_setStateFillMode GL_LINE";
|
qDebug() << "TODO: GLBackendState.cpp:do_setStateFillMode GL_LINE";
|
||||||
qDebug() << "TODO: GLBackendState.cpp:do_setStateFillMode GL_FILL";
|
qDebug() << "TODO: GLBackendState.cpp:do_setStateFillMode GL_FILL";
|
||||||
//glPolygonMode(GL_FRONT_AND_BACK, GL_FILL_MODES[mode]);
|
|
||||||
qDebug() << "TODO: GLBackendState.cpp:do_setStateFillMode glPolygonMode";
|
qDebug() << "TODO: GLBackendState.cpp:do_setStateFillMode glPolygonMode";
|
||||||
(void)CHECK_GL_ERROR();
|
(void)CHECK_GL_ERROR();
|
||||||
|
|
||||||
|
|
|
@ -178,6 +178,10 @@ GLenum GLTexelFormat::evalGLTexelFormatInternal(const gpu::Element& dstFormat) {
|
||||||
case gpu::NINT8:
|
case gpu::NINT8:
|
||||||
result = GL_RGBA8_SNORM;
|
result = GL_RGBA8_SNORM;
|
||||||
break;
|
break;
|
||||||
|
case gpu::COMPRESSED:
|
||||||
|
case gpu::NUINT2:
|
||||||
|
case gpu::NINT16:
|
||||||
|
case gpu::NUINT16:
|
||||||
case gpu::NUINT32:
|
case gpu::NUINT32:
|
||||||
case gpu::NINT32:
|
case gpu::NINT32:
|
||||||
case gpu::NUM_TYPES: // quiet compiler
|
case gpu::NUM_TYPES: // quiet compiler
|
||||||
|
@ -446,6 +450,8 @@ GLTexelFormat GLTexelFormat::evalGLTexelFormat(const Element& dstFormat, const E
|
||||||
texel.internalFormat = GL_R8_SNORM;
|
texel.internalFormat = GL_R8_SNORM;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case gpu::COMPRESSED:
|
||||||
|
case gpu::NUINT2:
|
||||||
case gpu::NUM_TYPES: { // quiet compiler
|
case gpu::NUM_TYPES: { // quiet compiler
|
||||||
Q_UNREACHABLE();
|
Q_UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
@ -489,6 +495,8 @@ GLTexelFormat GLTexelFormat::evalGLTexelFormat(const Element& dstFormat, const E
|
||||||
texel.internalFormat = GL_DEPTH_COMPONENT24;
|
texel.internalFormat = GL_DEPTH_COMPONENT24;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case gpu::COMPRESSED:
|
||||||
|
case gpu::NUINT2:
|
||||||
case gpu::NUM_TYPES: { // quiet compiler
|
case gpu::NUM_TYPES: { // quiet compiler
|
||||||
Q_UNREACHABLE();
|
Q_UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
@ -614,6 +622,8 @@ GLTexelFormat GLTexelFormat::evalGLTexelFormat(const Element& dstFormat, const E
|
||||||
break;
|
break;
|
||||||
case gpu::NUINT32:
|
case gpu::NUINT32:
|
||||||
case gpu::NINT32:
|
case gpu::NINT32:
|
||||||
|
case gpu::COMPRESSED:
|
||||||
|
case gpu::NUINT2:
|
||||||
case gpu::NUM_TYPES: // quiet compiler
|
case gpu::NUM_TYPES: // quiet compiler
|
||||||
Q_UNREACHABLE();
|
Q_UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
|
|
@ -166,8 +166,7 @@ void GLESBackend::do_drawIndexedInstanced(const Batch& batch, size_t paramOffset
|
||||||
void GLESBackend::do_multiDrawIndirect(const Batch& batch, size_t paramOffset) {
|
void GLESBackend::do_multiDrawIndirect(const Batch& batch, size_t paramOffset) {
|
||||||
#if (GPU_INPUT_PROFILE == GPU_CORE_43)
|
#if (GPU_INPUT_PROFILE == GPU_CORE_43)
|
||||||
uint commandCount = batch._params[paramOffset + 0]._uint;
|
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<GLvoid*>(_input._indirectBufferOffset), commandCount, (GLsizei)_input._indirectBufferStride);
|
//glMultiDrawArraysIndirect(mode, reinterpret_cast<GLvoid*>(_input._indirectBufferOffset), commandCount, (GLsizei)_input._indirectBufferStride);
|
||||||
qDebug() << "TODO: GLESBackend.cpp:do_multiDrawIndirect do_multiDrawIndirect";
|
qDebug() << "TODO: GLESBackend.cpp:do_multiDrawIndirect do_multiDrawIndirect";
|
||||||
_stats._DSNumDrawcalls += commandCount;
|
_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) {
|
void GLESBackend::do_multiDrawIndexedIndirect(const Batch& batch, size_t paramOffset) {
|
||||||
//#if (GPU_INPUT_PROFILE == GPU_CORE_43)
|
//#if (GPU_INPUT_PROFILE == GPU_CORE_43)
|
||||||
uint commandCount = batch._params[paramOffset + 0]._uint;
|
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];
|
||||||
GLenum indexType = gl::ELEMENT_TYPE_TO_GL[_input._indexBufferType];
|
//GLenum indexType = gl::ELEMENT_TYPE_TO_GL[_input._indexBufferType];
|
||||||
|
|
||||||
//glMultiDrawElementsIndirect(mode, indexType, reinterpret_cast<GLvoid*>(_input._indirectBufferOffset), commandCount, (GLsizei)_input._indirectBufferStride);
|
//glMultiDrawElementsIndirect(mode, indexType, reinterpret_cast<GLvoid*>(_input._indirectBufferOffset), commandCount, (GLsizei)_input._indirectBufferStride);
|
||||||
qDebug() << "TODO: GLESBackend.cpp:do_multiDrawIndexedIndirect glMultiDrawElementsIndirect";
|
qDebug() << "TODO: GLESBackend.cpp:do_multiDrawIndexedIndirect glMultiDrawElementsIndirect";
|
||||||
_stats._DSNumDrawcalls += commandCount;
|
_stats._DSNumDrawcalls += commandCount;
|
||||||
|
|
|
@ -99,7 +99,8 @@ public:
|
||||||
if (!_colorBuffers.empty()) {
|
if (!_colorBuffers.empty()) {
|
||||||
glDrawBuffers((GLsizei)_colorBuffers.size(), _colorBuffers.data());
|
glDrawBuffers((GLsizei)_colorBuffers.size(), _colorBuffers.data());
|
||||||
} else {
|
} else {
|
||||||
glDrawBuffers(1, {GL_NONE});
|
static const std::vector<GLenum> NO_BUFFERS{ GL_NONE };
|
||||||
|
glDrawBuffers((GLsizei)NO_BUFFERS.size(), NO_BUFFERS.data());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Now check for completness
|
// Now check for completness
|
||||||
|
|
|
@ -211,6 +211,6 @@ void CauterizedModel::updateRenderItems() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const Model::MeshState& CauterizedModel::getCauterizeMeshState(int index) const {
|
const Model::MeshState& CauterizedModel::getCauterizeMeshState(int index) const {
|
||||||
assert(index < _meshStates.size());
|
assert((size_t)index < _meshStates.size());
|
||||||
return _cauterizeMeshStates.at(index);
|
return _cauterizeMeshStates.at(index);
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,7 +180,7 @@ LightStage::LightPointer LightStage::removeLight(Index index) {
|
||||||
_lightMap.erase(removedLight);
|
_lightMap.erase(removedLight);
|
||||||
_descs[index] = Desc();
|
_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;
|
return removedLight;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue