Fix warning and remove unused headers

This commit is contained in:
Atlante45 2015-08-05 16:46:44 -07:00
parent a4f105f6c3
commit 3dc8bd47ae
12 changed files with 13 additions and 61 deletions

View file

@ -107,7 +107,7 @@ JointReferential::JointReferential(Referential* referential, EntityTree* tree, A
EntityItemPointer item = _tree->findEntityByID(_entityID);
const Model* model = getModel(item);
if (!isValid() || model == NULL || _jointIndex >= (uint32_t)(model->getJointStateCount())) {
if (isValid() && model != NULL && _jointIndex < (uint32_t)(model->getJointStateCount())) {
_lastRefDimension = item->getDimensions();
model->getJointRotationInWorldFrame(_jointIndex, _refRotation);
model->getJointPositionInWorldFrame(_jointIndex, _refPosition);

View file

@ -47,9 +47,6 @@
#include "Util.h"
#include "InterfaceLogging.h"
#include "gpu/GLBackend.h"
using namespace std;
const glm::vec3 DEFAULT_UP_DIRECTION(0.0f, 1.0f, 0.0f);

View file

@ -97,7 +97,6 @@ void SkeletonModel::initJointStates(QVector<JointState> states) {
}
const float PALM_PRIORITY = DEFAULT_PRIORITY;
const float LEAN_PRIORITY = DEFAULT_PRIORITY;
void SkeletonModel::updateRig(float deltaTime, glm::mat4 parentTransform) {
_rig->computeMotionAnimationState(deltaTime, _owningAvatar->getPosition(), _owningAvatar->getVelocity(), _owningAvatar->getOrientation());

View file

@ -14,7 +14,6 @@
#include <avatar/AvatarManager.h>
#include <DeferredLightingEffect.h>
#include <GLMHelpers.h>
#include <gpu/GLBackend.h>
#include <gpu/GLBackendShared.h>
#include <FramebufferCache.h>
#include <GLMHelpers.h>
@ -32,7 +31,6 @@
#include "ui/AvatarInputs.h"
const vec4 CONNECTION_STATUS_BORDER_COLOR{ 1.0f, 0.0f, 0.0f, 0.8f };
const float CONNECTION_STATUS_BORDER_LINE_WIDTH = 4.0f;
static const float ORTHO_NEAR_CLIP = -1000.0f;
static const float ORTHO_FAR_CLIP = 1000.0f;

View file

@ -15,7 +15,6 @@
#include <limits>
#include <render/Scene.h>
#include <gpu/GLBackend.h>
#include <RegisteredMetaTypes.h>
#include "Application.h"

View file

@ -15,7 +15,6 @@
#include <DependencyManager.h>
#include <GeometryCache.h>
#include <GLMHelpers.h>
#include <gpu/GLBackend.h>
#include <OffscreenUi.h>
#include <RegisteredMetaTypes.h>
#include <SharedUtil.h>

View file

@ -153,7 +153,6 @@ void GLBackend::releaseUniformBuffer(uint32_t slot) {
if (buf) {
auto* object = Backend::getGPUObject<GLBackend::GLBuffer>(*buf);
if (object) {
GLuint bo = object->_buffer;
glBindBufferBase(GL_UNIFORM_BUFFER, slot, 0); // RELEASE
(void) CHECK_GL_ERROR();
@ -222,7 +221,6 @@ void GLBackend::releaseResourceTexture(uint32_t slot) {
if (tex) {
auto* object = Backend::getGPUObject<GLBackend::GLTexture>(*tex);
if (object) {
GLuint to = object->_texture;
GLuint target = object->_target;
glActiveTexture(GL_TEXTURE0 + slot);
glBindTexture(target, 0); // RELEASE

View file

@ -636,8 +636,6 @@ OctreeElement* OctreeElement::getOrCreateChildElementAt(float x, float y, float
if (s > halfOurScale) {
return this;
}
// otherwise, we need to find which of our children we should recurse
glm::vec3 ourCenter = _cube.calcCenter();
int childIndex = getMyChildContainingPoint(glm::vec3(x, y, z));

View file

@ -20,7 +20,6 @@
#include <FSTReader.h>
#include <NumericalConstants.h>
#include <gpu/Batch.h>
#include <gpu/GLBackend.h>
#include "TextureCache.h"

View file

@ -9,37 +9,21 @@
//
#include <iostream>
#include <memory>
#include <mutex>
#include <unordered_map>
#include <string>
#include <vector>
#include <QWindow>
#include <QtGlobal>
#include <QFile>
#include <QImage>
#include <QLoggingCategory>
#include <gpu/Context.h>
#include <gpu/GLBackend.h>
#include <QOpenGLBuffer>
#include <QOpenGLContext>
#include <QOpenGLDebugLogger>
#include <QOpenGLShaderProgram>
#include <QOpenGLTexture>
#include <QOpenGLVertexArrayObject>
#include <QDir>
#include <QElapsedTimer>
#include <QGuiApplication>
#include <QLoggingCategory>
#include <QResizeEvent>
#include <QTime>
#include <QTimer>
#include <QWindow>
#include <QElapsedTimer>
#include <QDir>
#include <QGuiApplication>
#include <PathUtils.h>
#include "gpu/Batch.h"
#include "gpu/Context.h"
class RateCounter {
std::vector<float> times;
@ -71,7 +55,7 @@ public:
float rate() const {
if (elapsed() == 0.0f) {
return NAN;
return 0.0f;
}
return (float) count() / elapsed();
}

View file

@ -6,39 +6,20 @@
//
#include <iostream>
#include <memory>
#include <mutex>
#include <unordered_map>
#include <QWindow>
#include <QtGlobal>
#include <QFile>
#include <QImage>
#include <QLoggingCategory>
#include <gpu/Context.h>
#include <gpu/GLBackend.h>
#include <QOpenGLBuffer>
#include <QOpenGLContext>
#include <QOpenGLDebugLogger>
#include <QOpenGLShaderProgram>
#include <QOpenGLTexture>
#include <QOpenGLVertexArrayObject>
#include <QLoggingCategory>
#include <QResizeEvent>
#include <QTime>
#include <QTimer>
#include <QWindow>
#include <QElapsedTimer>
#include <QDir>
#include <QGuiApplication>
#include <PathUtils.h>
#include "gpu/Batch.h"
#include "gpu/Context.h"
#include "../model/Skybox_vert.h"
#include "../model/Skybox_frag.h"
@ -159,7 +140,7 @@ public:
float rate() const {
if (elapsed() == 0.0f) {
return NAN;
return 0.0f;
}
return (float) count() / elapsed();
}

View file

@ -68,7 +68,7 @@ public:
float rate() const {
if (elapsed() == 0.0f) {
return NAN;
return 0.0f;
}
return (float) count() / elapsed();
}