Fixing warnings in android build

This commit is contained in:
Bradley Austin Davis 2017-11-28 14:32:30 -08:00
parent 5febbc32f5
commit e4220aa44e
10 changed files with 25 additions and 14 deletions

View file

@ -147,6 +147,7 @@ static void CheckGLError(const char* label) {
}
// Contains vertex, normal and other data.
#if 0
namespace cube {
const std::array<float, 108> CUBE_COORDS{{
// Front face
@ -298,6 +299,7 @@ namespace cube {
0.0f, -1.0f, 0.0f
}};
}
#endif
namespace triangle {
static std::array<float, 9> TRIANGLE_VERTS {{

View file

@ -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();

View file

@ -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<GLBackend> result;
qDebug() << "Using OpenGL ES backend";

View file

@ -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

View file

@ -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();

View file

@ -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();
}

View file

@ -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<GLvoid*>(_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<GLvoid*>(_input._indirectBufferOffset), commandCount, (GLsizei)_input._indirectBufferStride);
qDebug() << "TODO: GLESBackend.cpp:do_multiDrawIndexedIndirect glMultiDrawElementsIndirect";
_stats._DSNumDrawcalls += commandCount;

View file

@ -99,7 +99,8 @@ public:
if (!_colorBuffers.empty()) {
glDrawBuffers((GLsizei)_colorBuffers.size(), _colorBuffers.data());
} 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

View file

@ -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);
}

View file

@ -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;
}