mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 16:58:09 +02:00
merge from upstream
This commit is contained in:
commit
2cdbe8bf7b
33 changed files with 577 additions and 569 deletions
|
@ -48,7 +48,7 @@ if (WIN32)
|
||||||
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||||
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic")
|
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-long-long -pedantic")
|
||||||
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unknown-pragmas")
|
#SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wno-unknown-pragmas")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fno-strict-aliasing -ggdb")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fno-strict-aliasing -Wno-unused-parameter -ggdb")
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
if (NOT MSVC12)
|
if (NOT MSVC12)
|
||||||
|
|
|
@ -33,7 +33,7 @@ DomainServerWebSessionData::DomainServerWebSessionData(const QJsonObject& userOb
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DomainServerWebSessionData::DomainServerWebSessionData(const DomainServerWebSessionData& otherSessionData) {
|
DomainServerWebSessionData::DomainServerWebSessionData(const DomainServerWebSessionData& otherSessionData) : QObject() {
|
||||||
_username = otherSessionData._username;
|
_username = otherSessionData._username;
|
||||||
_roles = otherSessionData._roles;
|
_roles = otherSessionData._roles;
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,7 +50,7 @@ public:
|
||||||
TreeNodeScript(const QString& localPath, const QString& fullPath, ScriptOrigin origin);
|
TreeNodeScript(const QString& localPath, const QString& fullPath, ScriptOrigin origin);
|
||||||
const QString& getLocalPath() { return _localPath; }
|
const QString& getLocalPath() { return _localPath; }
|
||||||
const QString& getFullPath() { return _fullPath; };
|
const QString& getFullPath() { return _fullPath; };
|
||||||
const ScriptOrigin getOrigin() { return _origin; };
|
ScriptOrigin getOrigin() { return _origin; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString _localPath;
|
QString _localPath;
|
||||||
|
|
|
@ -81,7 +81,7 @@ public:
|
||||||
FaceModel& getFaceModel() { return _faceModel; }
|
FaceModel& getFaceModel() { return _faceModel; }
|
||||||
const FaceModel& getFaceModel() const { return _faceModel; }
|
const FaceModel& getFaceModel() const { return _faceModel; }
|
||||||
|
|
||||||
const bool getReturnToCenter() const { return _returnHeadToCenter; } // Do you want head to try to return to center (depends on interface detected)
|
bool getReturnToCenter() const { return _returnHeadToCenter; } // Do you want head to try to return to center (depends on interface detected)
|
||||||
float getAverageLoudness() const { return _averageLoudness; }
|
float getAverageLoudness() const { return _averageLoudness; }
|
||||||
/// \return the point about which scaling occurs.
|
/// \return the point about which scaling occurs.
|
||||||
glm::vec3 getScalePivot() const;
|
glm::vec3 getScalePivot() const;
|
||||||
|
|
|
@ -91,7 +91,7 @@ void Overlays::renderHUD() {
|
||||||
lodManager->getOctreeSizeScale(),
|
lodManager->getOctreeSizeScale(),
|
||||||
lodManager->getBoundaryLevelAdjust(),
|
lodManager->getBoundaryLevelAdjust(),
|
||||||
RenderArgs::DEFAULT_RENDER_MODE, RenderArgs::MONO,
|
RenderArgs::DEFAULT_RENDER_MODE, RenderArgs::MONO,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
foreach(Overlay* thisOverlay, _overlaysHUD) {
|
foreach(Overlay* thisOverlay, _overlaysHUD) {
|
||||||
if (thisOverlay->is3D()) {
|
if (thisOverlay->is3D()) {
|
||||||
|
@ -126,7 +126,7 @@ void Overlays::renderWorld(bool drawFront, RenderArgs::RenderMode renderMode, Re
|
||||||
lodManager->getOctreeSizeScale(),
|
lodManager->getOctreeSizeScale(),
|
||||||
lodManager->getBoundaryLevelAdjust(),
|
lodManager->getBoundaryLevelAdjust(),
|
||||||
renderMode, renderSide,
|
renderMode, renderSide,
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
|
|
||||||
foreach(Overlay* thisOverlay, _overlaysWorld) {
|
foreach(Overlay* thisOverlay, _overlaysWorld) {
|
||||||
|
|
|
@ -64,7 +64,7 @@ AudioEffectOptions::AudioEffectOptions(QScriptValue arguments) :
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
AudioEffectOptions::AudioEffectOptions(const AudioEffectOptions &other) {
|
AudioEffectOptions::AudioEffectOptions(const AudioEffectOptions &other) : QObject() {
|
||||||
*this = other;
|
*this = other;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -393,7 +393,7 @@ void EntityTreeRenderer::render(RenderArgs::RenderMode renderMode,
|
||||||
_viewState->getShadowViewFrustum() : _viewState->getCurrentViewFrustum();
|
_viewState->getShadowViewFrustum() : _viewState->getCurrentViewFrustum();
|
||||||
|
|
||||||
RenderArgs args = { this, frustum, getSizeScale(), getBoundaryLevelAdjust(), renderMode, renderSide,
|
RenderArgs args = { this, frustum, getSizeScale(), getBoundaryLevelAdjust(), renderMode, renderSide,
|
||||||
renderDebugFlags, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
renderDebugFlags, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
|
|
||||||
_tree->lockForRead();
|
_tree->lockForRead();
|
||||||
|
|
||||||
|
|
|
@ -521,7 +521,7 @@ bool EntityTree::findInSphereOperation(OctreeElement* element, void* extraData)
|
||||||
|
|
||||||
// NOTE: assumes caller has handled locking
|
// NOTE: assumes caller has handled locking
|
||||||
void EntityTree::findEntities(const glm::vec3& center, float radius, QVector<const EntityItem*>& foundEntities) {
|
void EntityTree::findEntities(const glm::vec3& center, float radius, QVector<const EntityItem*>& foundEntities) {
|
||||||
FindAllNearPointArgs args = { center, radius };
|
FindAllNearPointArgs args = { center, radius, QVector<const EntityItem*>() };
|
||||||
// NOTE: This should use recursion, since this is a spatial operation
|
// NOTE: This should use recursion, since this is a spatial operation
|
||||||
recurseTreeWithOperation(findInSphereOperation, &args);
|
recurseTreeWithOperation(findInSphereOperation, &args);
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ bool FBXGeometry::convexHullContains(const glm::vec3& point) const {
|
||||||
|
|
||||||
auto checkEachPrimitive = [=](FBXMesh& mesh, QVector<int> indices, int primitiveSize) -> bool {
|
auto checkEachPrimitive = [=](FBXMesh& mesh, QVector<int> indices, int primitiveSize) -> bool {
|
||||||
// Check whether the point is "behind" all the primitives.
|
// Check whether the point is "behind" all the primitives.
|
||||||
for (unsigned int j = 0; j < indices.size(); j += primitiveSize) {
|
for (int j = 0; j < indices.size(); j += primitiveSize) {
|
||||||
if (!isPointBehindTrianglesPlane(point,
|
if (!isPointBehindTrianglesPlane(point,
|
||||||
mesh.vertices[indices[j]],
|
mesh.vertices[indices[j]],
|
||||||
mesh.vertices[indices[j + 1]],
|
mesh.vertices[indices[j + 1]],
|
||||||
|
@ -1469,7 +1469,8 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping,
|
||||||
bool rotationMinX = false, rotationMinY = false, rotationMinZ = false;
|
bool rotationMinX = false, rotationMinY = false, rotationMinZ = false;
|
||||||
bool rotationMaxX = false, rotationMaxY = false, rotationMaxZ = false;
|
bool rotationMaxX = false, rotationMaxY = false, rotationMaxZ = false;
|
||||||
glm::vec3 rotationMin, rotationMax;
|
glm::vec3 rotationMin, rotationMax;
|
||||||
FBXModel model = { name, -1 };
|
FBXModel model = { name, -1, glm::vec3(), glm::mat4(), glm::quat(), glm::quat(), glm::quat(),
|
||||||
|
glm::mat4(), glm::vec3(), glm::vec3()};
|
||||||
ExtractedMesh* mesh = NULL;
|
ExtractedMesh* mesh = NULL;
|
||||||
QVector<ExtractedBlendshape> blendshapes;
|
QVector<ExtractedBlendshape> blendshapes;
|
||||||
foreach (const FBXNode& subobject, object.children) {
|
foreach (const FBXNode& subobject, object.children) {
|
||||||
|
@ -1685,7 +1686,8 @@ FBXGeometry extractFBXGeometry(const FBXNode& node, const QVariantHash& mapping,
|
||||||
textureContent.insert(filename, content);
|
textureContent.insert(filename, content);
|
||||||
}
|
}
|
||||||
} else if (object.name == "Material") {
|
} else if (object.name == "Material") {
|
||||||
Material material = { glm::vec3(1.0f, 1.0f, 1.0f), glm::vec3(1.0f, 1.0f, 1.0f), glm::vec3(), 96.0f, 1.0f };
|
Material material = { glm::vec3(1.0f, 1.0f, 1.0f), glm::vec3(1.0f, 1.0f, 1.0f), glm::vec3(), 96.0f, 1.0f,
|
||||||
|
QString(""), QSharedPointer<model::Material>(NULL)};
|
||||||
foreach (const FBXNode& subobject, object.children) {
|
foreach (const FBXNode& subobject, object.children) {
|
||||||
bool properties = false;
|
bool properties = false;
|
||||||
QByteArray propertyName;
|
QByteArray propertyName;
|
||||||
|
|
|
@ -143,7 +143,7 @@ void GLBackend::do_draw(Batch& batch, uint32 paramOffset) {
|
||||||
uint32 startVertex = batch._params[paramOffset + 0]._uint;
|
uint32 startVertex = batch._params[paramOffset + 0]._uint;
|
||||||
|
|
||||||
glDrawArrays(mode, startVertex, numVertices);
|
glDrawArrays(mode, startVertex, numVertices);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLBackend::do_drawIndexed(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_drawIndexed(Batch& batch, uint32 paramOffset) {
|
||||||
|
@ -159,15 +159,15 @@ void GLBackend::do_drawIndexed(Batch& batch, uint32 paramOffset) {
|
||||||
GLenum glType = _elementTypeToGLType[_input._indexBufferType];
|
GLenum glType = _elementTypeToGLType[_input._indexBufferType];
|
||||||
|
|
||||||
glDrawElements(mode, numIndices, glType, reinterpret_cast<GLvoid*>(startIndex + _input._indexBufferOffset));
|
glDrawElements(mode, numIndices, glType, reinterpret_cast<GLvoid*>(startIndex + _input._indexBufferOffset));
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLBackend::do_drawInstanced(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_drawInstanced(Batch& batch, uint32 paramOffset) {
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLBackend::do_drawIndexedInstanced(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_drawIndexedInstanced(Batch& batch, uint32 paramOffset) {
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: As long as we have gl calls explicitely issued from interface
|
// TODO: As long as we have gl calls explicitely issued from interface
|
||||||
|
@ -189,7 +189,7 @@ void Batch::_glEnable(GLenum cap) {
|
||||||
}
|
}
|
||||||
void GLBackend::do_glEnable(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_glEnable(Batch& batch, uint32 paramOffset) {
|
||||||
glEnable(batch._params[paramOffset]._uint);
|
glEnable(batch._params[paramOffset]._uint);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glDisable(GLenum cap) {
|
void Batch::_glDisable(GLenum cap) {
|
||||||
|
@ -201,7 +201,7 @@ void Batch::_glDisable(GLenum cap) {
|
||||||
}
|
}
|
||||||
void GLBackend::do_glDisable(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_glDisable(Batch& batch, uint32 paramOffset) {
|
||||||
glDisable(batch._params[paramOffset]._uint);
|
glDisable(batch._params[paramOffset]._uint);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glEnableClientState(GLenum array) {
|
void Batch::_glEnableClientState(GLenum array) {
|
||||||
|
@ -213,7 +213,7 @@ void Batch::_glEnableClientState(GLenum array) {
|
||||||
}
|
}
|
||||||
void GLBackend::do_glEnableClientState(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_glEnableClientState(Batch& batch, uint32 paramOffset) {
|
||||||
glEnableClientState(batch._params[paramOffset]._uint);
|
glEnableClientState(batch._params[paramOffset]._uint);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glDisableClientState(GLenum array) {
|
void Batch::_glDisableClientState(GLenum array) {
|
||||||
|
@ -225,7 +225,7 @@ void Batch::_glDisableClientState(GLenum array) {
|
||||||
}
|
}
|
||||||
void GLBackend::do_glDisableClientState(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_glDisableClientState(Batch& batch, uint32 paramOffset) {
|
||||||
glDisableClientState(batch._params[paramOffset]._uint);
|
glDisableClientState(batch._params[paramOffset]._uint);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glCullFace(GLenum mode) {
|
void Batch::_glCullFace(GLenum mode) {
|
||||||
|
@ -237,7 +237,7 @@ void Batch::_glCullFace(GLenum mode) {
|
||||||
}
|
}
|
||||||
void GLBackend::do_glCullFace(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_glCullFace(Batch& batch, uint32 paramOffset) {
|
||||||
glCullFace(batch._params[paramOffset]._uint);
|
glCullFace(batch._params[paramOffset]._uint);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glAlphaFunc(GLenum func, GLclampf ref) {
|
void Batch::_glAlphaFunc(GLenum func, GLclampf ref) {
|
||||||
|
@ -252,7 +252,7 @@ void GLBackend::do_glAlphaFunc(Batch& batch, uint32 paramOffset) {
|
||||||
glAlphaFunc(
|
glAlphaFunc(
|
||||||
batch._params[paramOffset + 1]._uint,
|
batch._params[paramOffset + 1]._uint,
|
||||||
batch._params[paramOffset + 0]._float);
|
batch._params[paramOffset + 0]._float);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glDepthFunc(GLenum func) {
|
void Batch::_glDepthFunc(GLenum func) {
|
||||||
|
@ -264,7 +264,7 @@ void Batch::_glDepthFunc(GLenum func) {
|
||||||
}
|
}
|
||||||
void GLBackend::do_glDepthFunc(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_glDepthFunc(Batch& batch, uint32 paramOffset) {
|
||||||
glDepthFunc(batch._params[paramOffset]._uint);
|
glDepthFunc(batch._params[paramOffset]._uint);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glDepthMask(GLboolean flag) {
|
void Batch::_glDepthMask(GLboolean flag) {
|
||||||
|
@ -276,7 +276,7 @@ void Batch::_glDepthMask(GLboolean flag) {
|
||||||
}
|
}
|
||||||
void GLBackend::do_glDepthMask(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_glDepthMask(Batch& batch, uint32 paramOffset) {
|
||||||
glDepthMask(batch._params[paramOffset]._uint);
|
glDepthMask(batch._params[paramOffset]._uint);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glDepthRange(GLfloat zNear, GLfloat zFar) {
|
void Batch::_glDepthRange(GLfloat zNear, GLfloat zFar) {
|
||||||
|
@ -291,7 +291,7 @@ void GLBackend::do_glDepthRange(Batch& batch, uint32 paramOffset) {
|
||||||
glDepthRange(
|
glDepthRange(
|
||||||
batch._params[paramOffset + 1]._float,
|
batch._params[paramOffset + 1]._float,
|
||||||
batch._params[paramOffset + 0]._float);
|
batch._params[paramOffset + 0]._float);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glBindBuffer(GLenum target, GLuint buffer) {
|
void Batch::_glBindBuffer(GLenum target, GLuint buffer) {
|
||||||
|
@ -306,7 +306,7 @@ void GLBackend::do_glBindBuffer(Batch& batch, uint32 paramOffset) {
|
||||||
glBindBuffer(
|
glBindBuffer(
|
||||||
batch._params[paramOffset + 1]._uint,
|
batch._params[paramOffset + 1]._uint,
|
||||||
batch._params[paramOffset + 0]._uint);
|
batch._params[paramOffset + 0]._uint);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glBindTexture(GLenum target, GLuint texture) {
|
void Batch::_glBindTexture(GLenum target, GLuint texture) {
|
||||||
|
@ -321,7 +321,7 @@ void GLBackend::do_glBindTexture(Batch& batch, uint32 paramOffset) {
|
||||||
glBindTexture(
|
glBindTexture(
|
||||||
batch._params[paramOffset + 1]._uint,
|
batch._params[paramOffset + 1]._uint,
|
||||||
batch._params[paramOffset + 0]._uint);
|
batch._params[paramOffset + 0]._uint);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glActiveTexture(GLenum texture) {
|
void Batch::_glActiveTexture(GLenum texture) {
|
||||||
|
@ -333,7 +333,7 @@ void Batch::_glActiveTexture(GLenum texture) {
|
||||||
}
|
}
|
||||||
void GLBackend::do_glActiveTexture(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_glActiveTexture(Batch& batch, uint32 paramOffset) {
|
||||||
glActiveTexture(batch._params[paramOffset]._uint);
|
glActiveTexture(batch._params[paramOffset]._uint);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glDrawBuffers(GLsizei n, const GLenum* bufs) {
|
void Batch::_glDrawBuffers(GLsizei n, const GLenum* bufs) {
|
||||||
|
@ -348,7 +348,7 @@ void GLBackend::do_glDrawBuffers(Batch& batch, uint32 paramOffset) {
|
||||||
glDrawBuffers(
|
glDrawBuffers(
|
||||||
batch._params[paramOffset + 1]._uint,
|
batch._params[paramOffset + 1]._uint,
|
||||||
(const GLenum*)batch.editData(batch._params[paramOffset + 0]._uint));
|
(const GLenum*)batch.editData(batch._params[paramOffset + 0]._uint));
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glUseProgram(GLuint program) {
|
void Batch::_glUseProgram(GLuint program) {
|
||||||
|
@ -365,7 +365,7 @@ void GLBackend::do_glUseProgram(Batch& batch, uint32 paramOffset) {
|
||||||
_pipeline._invalidProgram = false;
|
_pipeline._invalidProgram = false;
|
||||||
glUseProgram(_pipeline._program);
|
glUseProgram(_pipeline._program);
|
||||||
|
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glUniform1f(GLint location, GLfloat v0) {
|
void Batch::_glUniform1f(GLint location, GLfloat v0) {
|
||||||
|
@ -385,7 +385,7 @@ void GLBackend::do_glUniform1f(Batch& batch, uint32 paramOffset) {
|
||||||
glUniform1f(
|
glUniform1f(
|
||||||
batch._params[paramOffset + 1]._int,
|
batch._params[paramOffset + 1]._int,
|
||||||
batch._params[paramOffset + 0]._float);
|
batch._params[paramOffset + 0]._float);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glUniform2f(GLint location, GLfloat v0, GLfloat v1) {
|
void Batch::_glUniform2f(GLint location, GLfloat v0, GLfloat v1) {
|
||||||
|
@ -402,7 +402,7 @@ void GLBackend::do_glUniform2f(Batch& batch, uint32 paramOffset) {
|
||||||
batch._params[paramOffset + 2]._int,
|
batch._params[paramOffset + 2]._int,
|
||||||
batch._params[paramOffset + 1]._float,
|
batch._params[paramOffset + 1]._float,
|
||||||
batch._params[paramOffset + 0]._float);
|
batch._params[paramOffset + 0]._float);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glUniform4fv(GLint location, GLsizei count, const GLfloat* value) {
|
void Batch::_glUniform4fv(GLint location, GLsizei count, const GLfloat* value) {
|
||||||
|
@ -421,7 +421,7 @@ void GLBackend::do_glUniform4fv(Batch& batch, uint32 paramOffset) {
|
||||||
batch._params[paramOffset + 1]._uint,
|
batch._params[paramOffset + 1]._uint,
|
||||||
(const GLfloat*)batch.editData(batch._params[paramOffset + 0]._uint));
|
(const GLfloat*)batch.editData(batch._params[paramOffset + 0]._uint));
|
||||||
|
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
|
void Batch::_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value) {
|
||||||
|
@ -441,7 +441,7 @@ void GLBackend::do_glUniformMatrix4fv(Batch& batch, uint32 paramOffset) {
|
||||||
batch._params[paramOffset + 2]._uint,
|
batch._params[paramOffset + 2]._uint,
|
||||||
batch._params[paramOffset + 1]._uint,
|
batch._params[paramOffset + 1]._uint,
|
||||||
(const GLfloat*)batch.editData(batch._params[paramOffset + 0]._uint));
|
(const GLfloat*)batch.editData(batch._params[paramOffset + 0]._uint));
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glEnableVertexAttribArray(GLint location) {
|
void Batch::_glEnableVertexAttribArray(GLint location) {
|
||||||
|
@ -453,7 +453,7 @@ void Batch::_glEnableVertexAttribArray(GLint location) {
|
||||||
}
|
}
|
||||||
void GLBackend::do_glEnableVertexAttribArray(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_glEnableVertexAttribArray(Batch& batch, uint32 paramOffset) {
|
||||||
glEnableVertexAttribArray(batch._params[paramOffset]._uint);
|
glEnableVertexAttribArray(batch._params[paramOffset]._uint);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glDisableVertexAttribArray(GLint location) {
|
void Batch::_glDisableVertexAttribArray(GLint location) {
|
||||||
|
@ -465,7 +465,7 @@ void Batch::_glDisableVertexAttribArray(GLint location) {
|
||||||
}
|
}
|
||||||
void GLBackend::do_glDisableVertexAttribArray(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_glDisableVertexAttribArray(Batch& batch, uint32 paramOffset) {
|
||||||
glDisableVertexAttribArray(batch._params[paramOffset]._uint);
|
glDisableVertexAttribArray(batch._params[paramOffset]._uint);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Batch::_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
|
void Batch::_glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) {
|
||||||
|
@ -484,6 +484,6 @@ void GLBackend::do_glColor4f(Batch& batch, uint32 paramOffset) {
|
||||||
batch._params[paramOffset + 2]._float,
|
batch._params[paramOffset + 2]._float,
|
||||||
batch._params[paramOffset + 1]._float,
|
batch._params[paramOffset + 1]._float,
|
||||||
batch._params[paramOffset + 0]._float);
|
batch._params[paramOffset + 0]._float);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ GLBackend::GLBuffer* GLBackend::syncGPUObject(const Buffer& buffer) {
|
||||||
if (!object) {
|
if (!object) {
|
||||||
object = new GLBuffer();
|
object = new GLBuffer();
|
||||||
glGenBuffers(1, &object->_buffer);
|
glGenBuffers(1, &object->_buffer);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
Backend::setGPUObject(buffer, object);
|
Backend::setGPUObject(buffer, object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ GLBackend::GLBuffer* GLBackend::syncGPUObject(const Buffer& buffer) {
|
||||||
object->_stamp = buffer.getSysmem().getStamp();
|
object->_stamp = buffer.getSysmem().getStamp();
|
||||||
object->_size = buffer.getSysmem().getSize();
|
object->_size = buffer.getSysmem().getSize();
|
||||||
//}
|
//}
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ void GLBackend::updateInput() {
|
||||||
glDisableVertexAttribArray(i);
|
glDisableVertexAttribArray(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
_input._attributeActivation.flip(i);
|
_input._attributeActivation.flip(i);
|
||||||
}
|
}
|
||||||
|
@ -108,7 +108,7 @@ void GLBackend::updateInput() {
|
||||||
if (_input._buffersState.test(bufferNum) || _input._invalidFormat) {
|
if (_input._buffersState.test(bufferNum) || _input._invalidFormat) {
|
||||||
GLuint vbo = gpu::GLBackend::getBufferID((*buffers[bufferNum]));
|
GLuint vbo = gpu::GLBackend::getBufferID((*buffers[bufferNum]));
|
||||||
glBindBuffer(GL_ARRAY_BUFFER, vbo);
|
glBindBuffer(GL_ARRAY_BUFFER, vbo);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
_input._buffersState[bufferNum] = false;
|
_input._buffersState[bufferNum] = false;
|
||||||
|
|
||||||
for (unsigned int i = 0; i < channel._slots.size(); i++) {
|
for (unsigned int i = 0; i < channel._slots.size(); i++) {
|
||||||
|
@ -142,7 +142,7 @@ void GLBackend::updateInput() {
|
||||||
glVertexAttribPointer(slot, count, type, isNormalized, stride,
|
glVertexAttribPointer(slot, count, type, isNormalized, stride,
|
||||||
reinterpret_cast<GLvoid*>(pointer));
|
reinterpret_cast<GLvoid*>(pointer));
|
||||||
}
|
}
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -219,5 +219,5 @@ void GLBackend::do_setIndexBuffer(Batch& batch, uint32 paramOffset) {
|
||||||
} else {
|
} else {
|
||||||
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||||
}
|
}
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,7 +24,6 @@ GLBackend::GLFramebuffer* GLBackend::syncGPUObject(const Framebuffer& framebuffe
|
||||||
GLFramebuffer* object = Backend::getGPUObject<GLBackend::GLFramebuffer>(framebuffer);
|
GLFramebuffer* object = Backend::getGPUObject<GLBackend::GLFramebuffer>(framebuffer);
|
||||||
|
|
||||||
// If GPU object already created and in sync
|
// If GPU object already created and in sync
|
||||||
bool needUpdate = false;
|
|
||||||
if (object) {
|
if (object) {
|
||||||
return object;
|
return object;
|
||||||
} else if (framebuffer.isEmpty()) {
|
} else if (framebuffer.isEmpty()) {
|
||||||
|
@ -36,7 +35,7 @@ GLBackend::GLFramebuffer* GLBackend::syncGPUObject(const Framebuffer& framebuffe
|
||||||
if (!object) {
|
if (!object) {
|
||||||
GLuint fbo;
|
GLuint fbo;
|
||||||
glGenFramebuffers(1, &fbo);
|
glGenFramebuffers(1, &fbo);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
|
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ void GLBackend::do_setPipeline(Batch& batch, uint32 paramOffset) {
|
||||||
// THis should be done on Pipeline::update...
|
// THis should be done on Pipeline::update...
|
||||||
if (_pipeline._invalidProgram) {
|
if (_pipeline._invalidProgram) {
|
||||||
glUseProgram(_pipeline._program);
|
glUseProgram(_pipeline._program);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
_pipeline._invalidProgram = false;
|
_pipeline._invalidProgram = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -122,7 +122,7 @@ void GLBackend::updatePipeline() {
|
||||||
if (_pipeline._invalidProgram) {
|
if (_pipeline._invalidProgram) {
|
||||||
// doing it here is aproblem for calls to glUniform.... so will do it on assing...
|
// doing it here is aproblem for calls to glUniform.... so will do it on assing...
|
||||||
glUseProgram(_pipeline._program);
|
glUseProgram(_pipeline._program);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
_pipeline._invalidProgram = false;
|
_pipeline._invalidProgram = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ void GLBackend::do_setUniformBuffer(Batch& batch, uint32 paramOffset) {
|
||||||
// GLuint bo = getBufferID(*uniformBuffer);
|
// GLuint bo = getBufferID(*uniformBuffer);
|
||||||
//glUniformBufferEXT(_shader._program, slot, bo);
|
//glUniformBufferEXT(_shader._program, slot, bo);
|
||||||
#endif
|
#endif
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLBackend::do_setUniformTexture(Batch& batch, uint32 paramOffset) {
|
void GLBackend::do_setUniformTexture(Batch& batch, uint32 paramOffset) {
|
||||||
|
@ -175,6 +175,6 @@ void GLBackend::do_setUniformTexture(Batch& batch, uint32 paramOffset) {
|
||||||
glActiveTexture(GL_TEXTURE0 + slot);
|
glActiveTexture(GL_TEXTURE0 + slot);
|
||||||
glBindTexture(GL_TEXTURE_2D, to);
|
glBindTexture(GL_TEXTURE_2D, to);
|
||||||
|
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -458,7 +458,7 @@ void GLBackend::getCurrentGLState(State::Data& state) {
|
||||||
| (mask[3] ? State::WRITE_ALPHA : 0);
|
| (mask[3] ? State::WRITE_ALPHA : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLBackend::syncPipelineStateCache() {
|
void GLBackend::syncPipelineStateCache() {
|
||||||
|
@ -485,7 +485,7 @@ 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]);
|
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL_MODES[mode]);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
_pipeline._stateCache.fillMode = State::FillMode(mode);
|
_pipeline._stateCache.fillMode = State::FillMode(mode);
|
||||||
}
|
}
|
||||||
|
@ -501,7 +501,7 @@ void GLBackend::do_setStateCullMode(int32 mode) {
|
||||||
glEnable(GL_CULL_FACE);
|
glEnable(GL_CULL_FACE);
|
||||||
glCullFace(GL_CULL_MODES[mode]);
|
glCullFace(GL_CULL_MODES[mode]);
|
||||||
}
|
}
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
_pipeline._stateCache.cullMode = State::CullMode(mode);
|
_pipeline._stateCache.cullMode = State::CullMode(mode);
|
||||||
}
|
}
|
||||||
|
@ -511,7 +511,7 @@ void GLBackend::do_setStateFrontFaceClockwise(bool isClockwise) {
|
||||||
if (_pipeline._stateCache.frontFaceClockwise != isClockwise) {
|
if (_pipeline._stateCache.frontFaceClockwise != isClockwise) {
|
||||||
static GLenum GL_FRONT_FACES[] = { GL_CCW, GL_CW };
|
static GLenum GL_FRONT_FACES[] = { GL_CCW, GL_CW };
|
||||||
glFrontFace(GL_FRONT_FACES[isClockwise]);
|
glFrontFace(GL_FRONT_FACES[isClockwise]);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
_pipeline._stateCache.frontFaceClockwise = isClockwise;
|
_pipeline._stateCache.frontFaceClockwise = isClockwise;
|
||||||
}
|
}
|
||||||
|
@ -524,7 +524,7 @@ void GLBackend::do_setStateDepthClipEnable(bool enable) {
|
||||||
} else {
|
} else {
|
||||||
glDisable(GL_DEPTH_CLAMP);
|
glDisable(GL_DEPTH_CLAMP);
|
||||||
}
|
}
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
_pipeline._stateCache.depthClipEnable = enable;
|
_pipeline._stateCache.depthClipEnable = enable;
|
||||||
}
|
}
|
||||||
|
@ -537,7 +537,7 @@ void GLBackend::do_setStateScissorEnable(bool enable) {
|
||||||
} else {
|
} else {
|
||||||
glDisable(GL_SCISSOR_TEST);
|
glDisable(GL_SCISSOR_TEST);
|
||||||
}
|
}
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
_pipeline._stateCache.scissorEnable = enable;
|
_pipeline._stateCache.scissorEnable = enable;
|
||||||
}
|
}
|
||||||
|
@ -550,7 +550,7 @@ void GLBackend::do_setStateMultisampleEnable(bool enable) {
|
||||||
} else {
|
} else {
|
||||||
glDisable(GL_MULTISAMPLE);
|
glDisable(GL_MULTISAMPLE);
|
||||||
}
|
}
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
_pipeline._stateCache.multisampleEnable = enable;
|
_pipeline._stateCache.multisampleEnable = enable;
|
||||||
}
|
}
|
||||||
|
@ -565,7 +565,7 @@ void GLBackend::do_setStateAntialiasedLineEnable(bool enable) {
|
||||||
glDisable(GL_POINT_SMOOTH);
|
glDisable(GL_POINT_SMOOTH);
|
||||||
glDisable(GL_LINE_SMOOTH);
|
glDisable(GL_LINE_SMOOTH);
|
||||||
}
|
}
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
_pipeline._stateCache.antialisedLineEnable = enable;
|
_pipeline._stateCache.antialisedLineEnable = enable;
|
||||||
}
|
}
|
||||||
|
@ -637,7 +637,7 @@ void GLBackend::do_setStateStencil(State::StencilActivation activation, State::S
|
||||||
} else {
|
} else {
|
||||||
glDisable(GL_STENCIL_TEST);
|
glDisable(GL_STENCIL_TEST);
|
||||||
}
|
}
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
_pipeline._stateCache.stencilActivation = activation;
|
_pipeline._stateCache.stencilActivation = activation;
|
||||||
_pipeline._stateCache.stencilTestFront = frontTest;
|
_pipeline._stateCache.stencilTestFront = frontTest;
|
||||||
|
@ -652,7 +652,7 @@ void GLBackend::do_setStateAlphaToCoverageEnable(bool enable) {
|
||||||
} else {
|
} else {
|
||||||
glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE);
|
glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE);
|
||||||
}
|
}
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
_pipeline._stateCache.alphaToCoverageEnable = enable;
|
_pipeline._stateCache.alphaToCoverageEnable = enable;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -684,7 +684,7 @@ void GLBackend::do_setStateBlend(State::BlendFunction function) {
|
||||||
GL_MAX };
|
GL_MAX };
|
||||||
|
|
||||||
glBlendEquationSeparate(GL_BLEND_OPS[function.getOperationColor()], GL_BLEND_OPS[function.getOperationAlpha()]);
|
glBlendEquationSeparate(GL_BLEND_OPS[function.getOperationColor()], GL_BLEND_OPS[function.getOperationAlpha()]);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
static GLenum BLEND_ARGS[] = {
|
static GLenum BLEND_ARGS[] = {
|
||||||
GL_ZERO,
|
GL_ZERO,
|
||||||
|
@ -706,7 +706,7 @@ void GLBackend::do_setStateBlend(State::BlendFunction function) {
|
||||||
|
|
||||||
glBlendFuncSeparate(BLEND_ARGS[function.getSourceColor()], BLEND_ARGS[function.getDestinationColor()],
|
glBlendFuncSeparate(BLEND_ARGS[function.getSourceColor()], BLEND_ARGS[function.getDestinationColor()],
|
||||||
BLEND_ARGS[function.getSourceAlpha()], BLEND_ARGS[function.getDestinationAlpha()]);
|
BLEND_ARGS[function.getSourceAlpha()], BLEND_ARGS[function.getDestinationAlpha()]);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
} else {
|
} else {
|
||||||
glDisable(GL_BLEND);
|
glDisable(GL_BLEND);
|
||||||
}
|
}
|
||||||
|
@ -735,5 +735,5 @@ void GLBackend::do_setStateBlendFactor(Batch& batch, uint32 paramOffset) {
|
||||||
batch._params[paramOffset + 3]._float);
|
batch._params[paramOffset + 3]._float);
|
||||||
|
|
||||||
glBlendColor(factor.x, factor.y, factor.z, factor.w);
|
glBlendColor(factor.x, factor.y, factor.z, factor.w);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
|
@ -176,9 +176,10 @@ public:
|
||||||
texel.internalFormat = GL_DEPTH_COMPONENT24;
|
texel.internalFormat = GL_DEPTH_COMPONENT24;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case gpu::NUM_TYPES:
|
case gpu::NUM_TYPES: { // quiet compiler
|
||||||
Q_UNREACHABLE();
|
Q_UNREACHABLE();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
qCDebug(gpulogging) << "Unknown combination of texel format";
|
qCDebug(gpulogging) << "Unknown combination of texel format";
|
||||||
|
@ -281,7 +282,7 @@ GLBackend::GLTexture* GLBackend::syncGPUObject(const Texture& texture) {
|
||||||
if (!object) {
|
if (!object) {
|
||||||
object = new GLTexture();
|
object = new GLTexture();
|
||||||
glGenTextures(1, &object->_texture);
|
glGenTextures(1, &object->_texture);
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
Backend::setGPUObject(texture, object);
|
Backend::setGPUObject(texture, object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -365,7 +366,7 @@ GLBackend::GLTexture* GLBackend::syncGPUObject(const Texture& texture) {
|
||||||
default:
|
default:
|
||||||
qCDebug(gpulogging) << "GLBackend::syncGPUObject(const Texture&) case for Texture Type " << texture.getType() << " not supported";
|
qCDebug(gpulogging) << "GLBackend::syncGPUObject(const Texture&) case for Texture Type " << texture.getType() << " not supported";
|
||||||
}
|
}
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
return object;
|
return object;
|
||||||
}
|
}
|
||||||
|
@ -448,6 +449,6 @@ void GLBackend::syncSampler(const Sampler& sampler, Texture::Type type, GLTextur
|
||||||
glTexParameterf(object->_target, GL_TEXTURE_MIN_LOD, (float) sampler.getMinMip());
|
glTexParameterf(object->_target, GL_TEXTURE_MIN_LOD, (float) sampler.getMinMip());
|
||||||
glTexParameterf(object->_target, GL_TEXTURE_MAX_LOD, (sampler.getMaxMip() == Sampler::MAX_MIP_LEVEL ? 1000.f : sampler.getMaxMip()));
|
glTexParameterf(object->_target, GL_TEXTURE_MAX_LOD, (sampler.getMaxMip() == Sampler::MAX_MIP_LEVEL ? 1000.f : sampler.getMaxMip()));
|
||||||
glTexParameterf(object->_target, GL_TEXTURE_MAX_ANISOTROPY_EXT, sampler.getMaxAnisotropy());
|
glTexParameterf(object->_target, GL_TEXTURE_MAX_ANISOTROPY_EXT, sampler.getMaxAnisotropy());
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -109,7 +109,7 @@ void GLBackend::updateTransform() {
|
||||||
}
|
}
|
||||||
glLoadMatrixf(reinterpret_cast< const GLfloat* >(&_transform._projection));
|
glLoadMatrixf(reinterpret_cast< const GLfloat* >(&_transform._projection));
|
||||||
|
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_transform._invalidModel || _transform._invalidView) {
|
if (_transform._invalidModel || _transform._invalidView) {
|
||||||
|
@ -141,7 +141,7 @@ void GLBackend::updateTransform() {
|
||||||
// glLoadIdentity();
|
// glLoadIdentity();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
CHECK_GL_ERROR();
|
(void) CHECK_GL_ERROR();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,7 @@ public:
|
||||||
State();
|
State();
|
||||||
virtual ~State();
|
virtual ~State();
|
||||||
|
|
||||||
const Stamp getStamp() const { return _stamp; }
|
Stamp getStamp() const { return _stamp; }
|
||||||
|
|
||||||
typedef ::gpu::ComparisonFunction ComparisonFunction;
|
typedef ::gpu::ComparisonFunction ComparisonFunction;
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ public:
|
||||||
|
|
||||||
uint8 getNumChannels() const { return _channels.size(); }
|
uint8 getNumChannels() const { return _channels.size(); }
|
||||||
const ChannelMap& getChannels() const { return _channels; }
|
const ChannelMap& getChannels() const { return _channels; }
|
||||||
const Offset getChannelStride(Slot channel) const { return _channels.at(channel)._stride; }
|
Offset getChannelStride(Slot channel) const { return _channels.at(channel)._stride; }
|
||||||
|
|
||||||
uint32 getElementTotalSize() const { return _elementTotalSize; }
|
uint32 getElementTotalSize() const { return _elementTotalSize; }
|
||||||
|
|
||||||
|
|
|
@ -151,8 +151,8 @@ public:
|
||||||
Texture& operator=(const Texture& buf); // deep copy of the sysmem texture
|
Texture& operator=(const Texture& buf); // deep copy of the sysmem texture
|
||||||
~Texture();
|
~Texture();
|
||||||
|
|
||||||
const Stamp getStamp() const { return _stamp; }
|
Stamp getStamp() const { return _stamp; }
|
||||||
const Stamp getDataStamp(uint16 level = 0) const { return _storage->getStamp(level); }
|
Stamp getDataStamp(uint16 level = 0) const { return _storage->getStamp(level); }
|
||||||
|
|
||||||
// The size in bytes of data stored in the texture
|
// The size in bytes of data stored in the texture
|
||||||
Size getSize() const { return _size; }
|
Size getSize() const { return _size; }
|
||||||
|
@ -264,7 +264,7 @@ public:
|
||||||
// Own sampler
|
// Own sampler
|
||||||
void setSampler(const Sampler& sampler);
|
void setSampler(const Sampler& sampler);
|
||||||
const Sampler& getSampler() const { return _sampler; }
|
const Sampler& getSampler() const { return _sampler; }
|
||||||
const Stamp getSamplerStamp() const { return _samplerStamp; }
|
Stamp getSamplerStamp() const { return _samplerStamp; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::unique_ptr< Storage > _storage;
|
std::unique_ptr< Storage > _storage;
|
||||||
|
|
|
@ -97,7 +97,7 @@ const Box Mesh::evalPartBounds(int partStart, int partEnd, Boxes& bounds) const
|
||||||
auto vertices = &_vertexBuffer.get<Vec3>((*part)._baseVertex);
|
auto vertices = &_vertexBuffer.get<Vec3>((*part)._baseVertex);
|
||||||
for (;index != endIndex; index++) {
|
for (;index != endIndex; index++) {
|
||||||
// skip primitive restart indices
|
// skip primitive restart indices
|
||||||
if ((*index) != PRIMITIVE_RESTART_INDEX) {
|
if ((*index) != (uint) PRIMITIVE_RESTART_INDEX) {
|
||||||
partBound += vertices[(*index)];
|
partBound += vertices[(*index)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,9 @@
|
||||||
#include "NetworkLogging.h"
|
#include "NetworkLogging.h"
|
||||||
#include "DataServerAccountInfo.h"
|
#include "DataServerAccountInfo.h"
|
||||||
|
|
||||||
|
#ifndef __GNUC__
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
|
||||||
DataServerAccountInfo::DataServerAccountInfo() :
|
DataServerAccountInfo::DataServerAccountInfo() :
|
||||||
_accessToken(),
|
_accessToken(),
|
||||||
|
@ -33,7 +35,7 @@ DataServerAccountInfo::DataServerAccountInfo() :
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DataServerAccountInfo::DataServerAccountInfo(const DataServerAccountInfo& otherInfo) {
|
DataServerAccountInfo::DataServerAccountInfo(const DataServerAccountInfo& otherInfo) : QObject() {
|
||||||
_accessToken = otherInfo._accessToken;
|
_accessToken = otherInfo._accessToken;
|
||||||
_username = otherInfo._username;
|
_username = otherInfo._username;
|
||||||
_xmppPassword = otherInfo._xmppPassword;
|
_xmppPassword = otherInfo._xmppPassword;
|
||||||
|
|
|
@ -33,6 +33,7 @@ HifiSockAddr::HifiSockAddr(const QHostAddress& address, quint16 port) :
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiSockAddr::HifiSockAddr(const HifiSockAddr& otherSockAddr) :
|
HifiSockAddr::HifiSockAddr(const HifiSockAddr& otherSockAddr) :
|
||||||
|
QObject(),
|
||||||
_address(otherSockAddr._address),
|
_address(otherSockAddr._address),
|
||||||
_port(otherSockAddr._port)
|
_port(otherSockAddr._port)
|
||||||
{
|
{
|
||||||
|
|
|
@ -39,8 +39,7 @@ NetworkPeer::NetworkPeer(const QUuid& uuid, const HifiSockAddr& publicSocket, co
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NetworkPeer::NetworkPeer(const NetworkPeer& otherPeer) {
|
NetworkPeer::NetworkPeer(const NetworkPeer& otherPeer) : QObject() {
|
||||||
|
|
||||||
_uuid = otherPeer._uuid;
|
_uuid = otherPeer._uuid;
|
||||||
_publicSocket = otherPeer._publicSocket;
|
_publicSocket = otherPeer._publicSocket;
|
||||||
_localSocket = otherPeer._localSocket;
|
_localSocket = otherPeer._localSocket;
|
||||||
|
|
|
@ -31,7 +31,7 @@ OAuthAccessToken::OAuthAccessToken(const QJsonObject& jsonObject) :
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OAuthAccessToken::OAuthAccessToken(const OAuthAccessToken& otherToken) {
|
OAuthAccessToken::OAuthAccessToken(const OAuthAccessToken& otherToken) : QObject() {
|
||||||
token = otherToken.token;
|
token = otherToken.token;
|
||||||
refreshToken = otherToken.refreshToken;
|
refreshToken = otherToken.refreshToken;
|
||||||
expiryTimestamp = otherToken.expiryTimestamp;
|
expiryTimestamp = otherToken.expiryTimestamp;
|
||||||
|
|
|
@ -18,7 +18,9 @@
|
||||||
#include "NetworkLogging.h"
|
#include "NetworkLogging.h"
|
||||||
|
|
||||||
#include "RSAKeypairGenerator.h"
|
#include "RSAKeypairGenerator.h"
|
||||||
|
#ifndef __GNUC__
|
||||||
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
#endif
|
||||||
|
|
||||||
RSAKeypairGenerator::RSAKeypairGenerator(QObject* parent) :
|
RSAKeypairGenerator::RSAKeypairGenerator(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent)
|
||||||
|
|
|
@ -168,7 +168,7 @@ void OctreeRenderer::render(RenderArgs::RenderMode renderMode,
|
||||||
RenderArgs::RenderSide renderSide,
|
RenderArgs::RenderSide renderSide,
|
||||||
RenderArgs::DebugFlags renderDebugFlags) {
|
RenderArgs::DebugFlags renderDebugFlags) {
|
||||||
RenderArgs args = { this, _viewFrustum, getSizeScale(), getBoundaryLevelAdjust(), renderMode, renderSide,
|
RenderArgs args = { this, _viewFrustum, getSizeScale(), getBoundaryLevelAdjust(), renderMode, renderSide,
|
||||||
renderDebugFlags, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
renderDebugFlags, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
|
||||||
if (_tree) {
|
if (_tree) {
|
||||||
_tree->lockForRead();
|
_tree->lockForRead();
|
||||||
_tree->recurseTreeWithOperation(renderOperation, &args);
|
_tree->recurseTreeWithOperation(renderOperation, &args);
|
||||||
|
|
|
@ -1796,7 +1796,9 @@ NetworkGeometry::NetworkGeometry(const QUrl& url, const QSharedPointer<NetworkGe
|
||||||
|
|
||||||
if (url.isEmpty()) {
|
if (url.isEmpty()) {
|
||||||
// make the minimal amount of dummy geometry to satisfy Model
|
// make the minimal amount of dummy geometry to satisfy Model
|
||||||
FBXJoint joint = { false, QVector<int>(), -1 };
|
FBXJoint joint = { false, QVector<int>(), -1, 0.0f, 0.0f, glm::vec3(), glm::mat4(), glm::quat(), glm::quat(),
|
||||||
|
glm::quat(), glm::mat4(), glm::mat4(), glm::vec3(), glm::vec3(), glm::quat(), glm::quat(),
|
||||||
|
glm::mat4(), QString(""), glm::vec3(), glm::quat(), SHAPE_TYPE_NONE, false};
|
||||||
_geometry.joints.append(joint);
|
_geometry.joints.append(joint);
|
||||||
_geometry.leftEyeJointIndex = -1;
|
_geometry.leftEyeJointIndex = -1;
|
||||||
_geometry.rightEyeJointIndex = -1;
|
_geometry.rightEyeJointIndex = -1;
|
||||||
|
|
|
@ -256,7 +256,7 @@ void JointState::setVisibleRotationInConstrainedFrame(const glm::quat& targetRot
|
||||||
_visibleRotation = parentRotation * _fbxJoint->preRotation * _visibleRotationInConstrainedFrame * _fbxJoint->postRotation;
|
_visibleRotation = parentRotation * _fbxJoint->preRotation * _visibleRotationInConstrainedFrame * _fbxJoint->postRotation;
|
||||||
}
|
}
|
||||||
|
|
||||||
const bool JointState::rotationIsDefault(const glm::quat& rotation, float tolerance) const {
|
bool JointState::rotationIsDefault(const glm::quat& rotation, float tolerance) const {
|
||||||
glm::quat defaultRotation = _fbxJoint->rotation;
|
glm::quat defaultRotation = _fbxJoint->rotation;
|
||||||
return glm::abs(rotation.x - defaultRotation.x) < tolerance &&
|
return glm::abs(rotation.x - defaultRotation.x) < tolerance &&
|
||||||
glm::abs(rotation.y - defaultRotation.y) < tolerance &&
|
glm::abs(rotation.y - defaultRotation.y) < tolerance &&
|
||||||
|
|
|
@ -88,7 +88,7 @@ public:
|
||||||
const glm::quat& getRotationInConstrainedFrame() const { return _rotationInConstrainedFrame; }
|
const glm::quat& getRotationInConstrainedFrame() const { return _rotationInConstrainedFrame; }
|
||||||
const glm::quat& getVisibleRotationInConstrainedFrame() const { return _visibleRotationInConstrainedFrame; }
|
const glm::quat& getVisibleRotationInConstrainedFrame() const { return _visibleRotationInConstrainedFrame; }
|
||||||
|
|
||||||
const bool rotationIsDefault(const glm::quat& rotation, float tolerance = EPSILON) const;
|
bool rotationIsDefault(const glm::quat& rotation, float tolerance = EPSILON) const;
|
||||||
|
|
||||||
glm::quat getDefaultRotationInParentFrame() const;
|
glm::quat getDefaultRotationInParentFrame() const;
|
||||||
const glm::vec3& getDefaultTranslationInConstrainedFrame() const;
|
const glm::vec3& getDefaultTranslationInConstrainedFrame() const;
|
||||||
|
|
|
@ -38,7 +38,7 @@ public:
|
||||||
push(glm::mat4());
|
push(glm::mat4());
|
||||||
}
|
}
|
||||||
|
|
||||||
explicit MatrixStack(const MatrixStack & other) {
|
explicit MatrixStack(const MatrixStack & other) : std::stack<glm::mat4>() {
|
||||||
*((std::stack<glm::mat4>*)this) = *((std::stack<glm::mat4>*)&other);
|
*((std::stack<glm::mat4>*)this) = *((std::stack<glm::mat4>*)&other);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ public:
|
||||||
void setConvexHulls(const QVector<QVector<glm::vec3>>& points);
|
void setConvexHulls(const QVector<QVector<glm::vec3>>& points);
|
||||||
void setCapsuleY(float radius, float halfHeight);
|
void setCapsuleY(float radius, float halfHeight);
|
||||||
|
|
||||||
const int getType() const { return _type; }
|
int getType() const { return _type; }
|
||||||
|
|
||||||
const glm::vec3& getHalfExtents() const { return _halfExtents; }
|
const glm::vec3& getHalfExtents() const { return _halfExtents; }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue