fix a bunch of warnings

This commit is contained in:
ZappoMan 2015-07-20 15:12:27 -07:00
parent d41d86c33c
commit 648d0f6d43
11 changed files with 21 additions and 22 deletions

View file

@ -333,11 +333,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
_isThrottleFPSEnabled(false),
_aboutToQuit(false),
_notifiedPacketVersionMismatchThisDomain(false),
_glWidget(new GLCanvas()),
_domainConnectionRefusals(QList<QString>()),
_maxOctreePPS(maxOctreePacketsPerSecond.get()),
_lastFaceTrackerUpdate(0),
_applicationOverlay(),
_glWidget(new GLCanvas())
_applicationOverlay()
{
setInstance(this);
#ifdef Q_OS_WIN

View file

@ -60,8 +60,8 @@ void GLCanvas::initializeGL() {
void GLCanvas::paintGL() {
PROFILE_RANGE(__FUNCTION__);
if (!_throttleRendering
&& (!Application::getInstance()->getWindow()->isMinimized()) || !Application::getInstance()->isThrottleFPSEnabled()) {
if (!_throttleRendering &&
(!Application::getInstance()->getWindow()->isMinimized() || !Application::getInstance()->isThrottleFPSEnabled())) {
Application::getInstance()->paintGL();
}
}

View file

@ -31,14 +31,14 @@
static const float TILT = 0.0f;
static const unsigned int STARFIELD_NUM_STARS = 50000;
static const unsigned int STARFIELD_SEED = 1;
static const float STAR_COLORIZATION = 0.1f;
//static const float STAR_COLORIZATION = 0.1f;
static const float TAU = 6.28318530717958f;
static const float HALF_TAU = TAU / 2.0f;
static const float QUARTER_TAU = TAU / 4.0f;
static const float MILKY_WAY_WIDTH = TAU / 30.0f; // width in radians of one half of the Milky Way
static const float MILKY_WAY_INCLINATION = 0.0f; // angle of Milky Way from horizontal in degrees
static const float MILKY_WAY_RATIO = 0.4f;
//static const float HALF_TAU = TAU / 2.0f;
//static const float QUARTER_TAU = TAU / 4.0f;
//static const float MILKY_WAY_WIDTH = TAU / 30.0f; // width in radians of one half of the Milky Way
//static const float MILKY_WAY_INCLINATION = 0.0f; // angle of Milky Way from horizontal in degrees
//static const float MILKY_WAY_RATIO = 0.4f;
static const char* UNIFORM_TIME_NAME = "iGlobalTime";
@ -55,9 +55,11 @@ static float frand() {
}
// Produce a random radian value between 0 and 2 PI (TAU)
/*
static float rrand() {
return frand() * TAU;
}
*/
// http://mathworld.wolfram.com/SpherePointPicking.html
static vec2 randPolar() {
@ -117,7 +119,7 @@ void Stars::render(RenderArgs* renderArgs, float alpha) {
static std::once_flag once;
const int VERTICES_SLOT = 0;
const int COLOR_SLOT = 2;
//const int COLOR_SLOT = 2;
std::call_once(once, [&] {
QElapsedTimer startTime;

View file

@ -49,7 +49,6 @@ void FaceModel::simulate(float deltaTime, bool fullUpdate) {
}
void FaceModel::maybeUpdateNeckRotation(const JointState& parentState, const FBXJoint& joint, JointState& state) {
Avatar* owningAvatar = static_cast<Avatar*>(_owningHead->_owningAvatar);
// get the rotation axes in joint space and use them to adjust the rotation
glm::mat3 axes = glm::mat3_cast(glm::quat());
glm::mat3 inverse = glm::mat3(glm::inverse(parentState.getTransform() *

View file

@ -398,6 +398,8 @@ void OculusManager::connect(QOpenGLContext* shareContext) {
int configResult = ovrHmd_ConfigureRendering(_ovrHmd, &cfg.Config,
distortionCaps, _eyeFov, _eyeRenderDesc);
assert(configResult);
Q_UNUSED(configResult);
_outputWindow->doneCurrent();
for_each_eye([&](ovrEyeType eye) {

View file

@ -32,8 +32,8 @@
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 = -10000;
static const float ORTHO_FAR_CLIP = 10000;
static const float ORTHO_NEAR_CLIP = -1000;
static const float ORTHO_FAR_CLIP = 1000;
ApplicationOverlay::ApplicationOverlay()
{
@ -131,7 +131,7 @@ void ApplicationOverlay::renderAudioScope(RenderArgs* renderArgs) {
batch.setResourceTexture(0, textureCache->getWhiteTexture());
int width = renderArgs->_viewport.z;
int height = renderArgs->_viewport.w;
mat4 legacyProjection = glm::ortho<float>(0, width, height, 0, -1000, 1000);
mat4 legacyProjection = glm::ortho<float>(0, width, height, 0, ORTHO_NEAR_CLIP, ORTHO_FAR_CLIP);
batch.setProjectionTransform(legacyProjection);
batch.setModelTransform(Transform());
batch.setViewTransform(Transform());
@ -151,7 +151,7 @@ void ApplicationOverlay::renderOverlays(RenderArgs* renderArgs) {
batch.setResourceTexture(0, textureCache->getWhiteTexture());
int width = renderArgs->_viewport.z;
int height = renderArgs->_viewport.w;
mat4 legacyProjection = glm::ortho<float>(0, width, height, 0, -1000, 1000);
mat4 legacyProjection = glm::ortho<float>(0, width, height, 0, ORTHO_NEAR_CLIP, ORTHO_FAR_CLIP);
batch.setProjectionTransform(legacyProjection);
batch.setModelTransform(Transform());
batch.setViewTransform(Transform());

View file

@ -13,7 +13,7 @@
#define hifi_ApplicationOverlay_h
#include <gpu/Texture.h>
class QOpenGLFramebufferObject;
//class QOpenGLFramebufferObject;
// Handles the drawing of the overlays to the screen
// TODO, move divide up the rendering, displaying and input handling

View file

@ -31,8 +31,6 @@ void LocalModelsOverlay::update(float deltatime) {
void LocalModelsOverlay::render(RenderArgs* args) {
if (_visible) {
float glowLevel = getGlowLevel(); // FIXME, glowing removed for now
auto batch = args ->_batch;
Transform transform = Transform();
transform.setTranslation(args->_viewFrustum->getPosition() + getPosition());

View file

@ -40,7 +40,6 @@ TextRenderer3D* TextRenderer3D::getInstance(const char* family, float pointSize,
TextRenderer3D::TextRenderer3D(const char* family, float pointSize, int weight, bool italic,
EffectType effect, int effectThickness) :
_pointSize(pointSize),
_effectType(effect),
_effectThickness(effectThickness),
_font(Font::load(family)) {

View file

@ -54,7 +54,6 @@ private:
// text color
glm::vec4 _color;
float _pointSize{ DEFAULT_POINT_SIZE };
Font* _font;
};

View file

@ -184,7 +184,7 @@ protected:
#define SERIF_FONT_FAMILY "Times New Roman"
#endif
static const wchar_t* EXAMPLE_TEXT = L"Hello";
//static const wchar_t* EXAMPLE_TEXT = L"Hello";
//static const wchar_t* EXAMPLE_TEXT = L"\xC1y Hello 1.0\ny\xC1 line 2\n\xC1y";
static const glm::uvec2 QUAD_OFFSET(10, 10);