mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:37:17 +02:00
more windows build fixes
This commit is contained in:
parent
2017f850c4
commit
d92d043e8f
5 changed files with 38 additions and 12 deletions
|
@ -34,7 +34,8 @@ if (UNIX AND NOT APPLE)
|
||||||
endif (UNIX AND NOT APPLE)
|
endif (UNIX AND NOT APPLE)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
add_definitions( -D_USE_MATH_DEFINES ) # apparently needed to get M_PI and other defines from cmath/math.h
|
add_definitions( -D_USE_MATH_DEFINES -DWINDOWS_LEAN_AND_MEAN ) # apparently needed to get M_PI and other defines from cmath/math.h
|
||||||
|
|
||||||
#set(GLUT_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external/glut)
|
#set(GLUT_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external/glut)
|
||||||
#set(GL_HEADERS "#define GLEW_STATIC\n#define FREEGLUT_STATIC\n#define FREEGLUT_LIB_PRAGMAS 0\n#include <GL/glew.h>\n#include <GL/wglew.h>\n#include <GL/freeglut_std.h>\n#include <GL/freeglut_ext.h>")
|
#set(GL_HEADERS "#define GLEW_STATIC\n#define FREEGLUT_STATIC\n#define FREEGLUT_LIB_PRAGMAS 0\n#include <GL/glew.h>\n#include <GL/wglew.h>\n#include <GL/freeglut_std.h>\n#include <GL/freeglut_ext.h>")
|
||||||
|
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
// Created by Andrzej Kapolka on 5/10/13.
|
// Created by Andrzej Kapolka on 5/10/13.
|
||||||
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#include <Systime.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -3477,11 +3481,6 @@ void Application::displayOverlay() {
|
||||||
glPopMatrix();
|
glPopMatrix();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
double roundf(double value) {
|
|
||||||
return (value > 0.0) ? floor(value + 0.5) : ceil(value - 0.5);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void Application::displayStats() {
|
void Application::displayStats() {
|
||||||
int statsVerticalOffset = 8;
|
int statsVerticalOffset = 8;
|
||||||
|
|
|
@ -6,6 +6,11 @@
|
||||||
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
|
// Copyright (c) 2013 HighFidelity, Inc. All rights reserved.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define WANT_TIMEVAL
|
||||||
|
#include <Systime.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
|
@ -115,17 +120,17 @@ void Transmitter::renderLevels(int width, int height) {
|
||||||
|
|
||||||
// Draw the numeric degree/sec values from the gyros
|
// Draw the numeric degree/sec values from the gyros
|
||||||
sprintf(val, "Pitch Rate %4.1f", _lastRotationRate.x);
|
sprintf(val, "Pitch Rate %4.1f", _lastRotationRate.x);
|
||||||
drawtext(LEVEL_CORNER_X, LEVEL_CORNER_Y, 0.10, 0, 1.0, 1, val, 0, 1, 0);
|
drawtext(LEVEL_CORNER_X, LEVEL_CORNER_Y, 0.10f, 0, 1.0f, 1, val, 0, 1, 0);
|
||||||
sprintf(val, "Yaw Rate %4.1f", _lastRotationRate.y);
|
sprintf(val, "Yaw Rate %4.1f", _lastRotationRate.y);
|
||||||
drawtext(LEVEL_CORNER_X, LEVEL_CORNER_Y + 15, 0.10, 0, 1.0, 1, val, 0, 1, 0);
|
drawtext(LEVEL_CORNER_X, LEVEL_CORNER_Y + 15, 0.10f, 0, 1.0f, 1, val, 0, 1, 0);
|
||||||
sprintf(val, "Roll Rate %4.1f", _lastRotationRate.z);
|
sprintf(val, "Roll Rate %4.1f", _lastRotationRate.z);
|
||||||
drawtext(LEVEL_CORNER_X, LEVEL_CORNER_Y + 30, 0.10, 0, 1.0, 1, val, 0, 1, 0);
|
drawtext(LEVEL_CORNER_X, LEVEL_CORNER_Y + 30, 0.10f, 0, 1.0f, 1, val, 0, 1, 0);
|
||||||
sprintf(val, "Pitch %4.3f", _estimatedRotation.x);
|
sprintf(val, "Pitch %4.3f", _estimatedRotation.x);
|
||||||
drawtext(LEVEL_CORNER_X, LEVEL_CORNER_Y + 45, 0.10, 0, 1.0, 1, val, 0, 1, 0);
|
drawtext(LEVEL_CORNER_X, LEVEL_CORNER_Y + 45, 0.10f, 0, 1.0f, 1, val, 0, 1, 0);
|
||||||
sprintf(val, "Yaw %4.3f", _estimatedRotation.y);
|
sprintf(val, "Yaw %4.3f", _estimatedRotation.y);
|
||||||
drawtext(LEVEL_CORNER_X, LEVEL_CORNER_Y + 60, 0.10, 0, 1.0, 1, val, 0, 1, 0);
|
drawtext(LEVEL_CORNER_X, LEVEL_CORNER_Y + 60, 0.10f, 0, 1.0f, 1, val, 0, 1, 0);
|
||||||
sprintf(val, "Roll %4.3f", _estimatedRotation.z);
|
sprintf(val, "Roll %4.3f", _estimatedRotation.z);
|
||||||
drawtext(LEVEL_CORNER_X, LEVEL_CORNER_Y + 75, 0.10, 0, 1.0, 1, val, 0, 1, 0);
|
drawtext(LEVEL_CORNER_X, LEVEL_CORNER_Y + 75, 0.10f, 0, 1.0f, 1, val, 0, 1, 0);
|
||||||
|
|
||||||
// Draw the levels as horizontal lines
|
// Draw the levels as horizontal lines
|
||||||
const int LEVEL_CENTER = 150;
|
const int LEVEL_CENTER = 150;
|
||||||
|
|
|
@ -9,6 +9,11 @@
|
||||||
|
|
||||||
#include <QNetworkReply>
|
#include <QNetworkReply>
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
#define WANT_TIMEVAL
|
||||||
|
#include <Systime.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "GeometryCache.h"
|
#include "GeometryCache.h"
|
||||||
#include "world.h"
|
#include "world.h"
|
||||||
|
|
|
@ -11,11 +11,27 @@
|
||||||
#ifndef __hifi__windowshacks__
|
#ifndef __hifi__windowshacks__
|
||||||
#define __hifi__windowshacks__
|
#define __hifi__windowshacks__
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
|
||||||
#undef NOMINMAX
|
#undef NOMINMAX
|
||||||
|
|
||||||
#define GLdouble GLdouble
|
#define GLdouble GLdouble
|
||||||
#define GL_DOUBLE 0x140A
|
#define GL_DOUBLE 0x140A
|
||||||
|
|
||||||
|
|
||||||
#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
|
#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
|
||||||
#define GL_RESCALE_NORMAL 0x803A
|
#define GL_RESCALE_NORMAL 0x803A
|
||||||
|
#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
|
||||||
|
#define GL_CLAMP_TO_BORDER 0x812D
|
||||||
|
|
||||||
|
#include <cmath>
|
||||||
|
inline double roundf(double value) {
|
||||||
|
return (value > 0.0) ? floor(value + 0.5) : ceil(value - 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endif // WIN32
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif // __hifi__windowshacks__
|
#endif // __hifi__windowshacks__
|
Loading…
Reference in a new issue