Avoid compile errors on Linux. Fixes #107.

This commit is contained in:
Christopher Bruns 2015-12-30 17:54:54 -05:00
parent 8e237e6146
commit 655defed28
3 changed files with 3 additions and 2 deletions

View file

@ -11,7 +11,7 @@ VSMatrix EyePose::GetProjection(FLOATTYPE fov, FLOATTYPE aspectRatio, FLOATTYPE
VSMatrix result; VSMatrix result;
// Lifted from gl_scene.cpp FGLRenderer::SetProjection() // Lifted from gl_scene.cpp FGLRenderer::SetProjection()
float fovy = 2 * RAD2DEG(atan(tan(DEG2RAD(fov) / 2) / fovRatio)); float fovy = (float)(2 * RAD2DEG(atan(tan(DEG2RAD(fov) / 2) / fovRatio)));
result.perspective(fovy, aspectRatio, 5.f, 65536.f); result.perspective(fovy, aspectRatio, 5.f, 65536.f);
return result; return result;

View file

@ -2,6 +2,7 @@
#define GL_STEREO3D_H_ #define GL_STEREO3D_H_
#include <vector> #include <vector>
#include <cstring> // needed for memcpy on linux, which is needed by VSMatrix copy ctor
#include "gl/data/gl_matrix.h" #include "gl/data/gl_matrix.h"

View file

@ -14,7 +14,7 @@ CVAR(Float, vr_hunits_per_meter, 41.0f, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) // MET
namespace s3d { namespace s3d {
// Initialize static member // Initialize static member
Stereo3DMode const * Stereo3DMode::currentStereo3DMode = nullptr; Stereo3DMode const * Stereo3DMode::currentStereo3DMode = 0; // "nullptr" not resolved on linux (presumably not C++11)
/* static */ /* static */
void Stereo3DMode::setCurrentMode(const Stereo3DMode& mode) { void Stereo3DMode::setCurrentMode(const Stereo3DMode& mode) {