mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 18:41:10 +02:00
Merge pull request #6308 from hyperlogic/tony/mac-fixes
Fixes for Mac build and crash on startup
This commit is contained in:
commit
673de7f3e6
5 changed files with 14 additions and 12 deletions
|
@ -938,14 +938,12 @@ void Application::initializeGL() {
|
||||||
qCDebug(interfaceapp) << "Created Display Window.";
|
qCDebug(interfaceapp) << "Created Display Window.";
|
||||||
|
|
||||||
// initialize glut for shape drawing; Qt apparently initializes it on OS X
|
// initialize glut for shape drawing; Qt apparently initializes it on OS X
|
||||||
#ifndef __APPLE__
|
if (_isGLInitialized) {
|
||||||
static bool isInitialized = false;
|
|
||||||
if (isInitialized) {
|
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
isInitialized = true;
|
_isGLInitialized = true;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
// Where the gpuContext is initialized and where the TRUE Backend is created and assigned
|
// Where the gpuContext is initialized and where the TRUE Backend is created and assigned
|
||||||
gpu::Context::init<gpu::GLBackend>();
|
gpu::Context::init<gpu::GLBackend>();
|
||||||
_gpuContext = std::make_shared<gpu::Context>();
|
_gpuContext = std::make_shared<gpu::Context>();
|
||||||
|
@ -1057,7 +1055,9 @@ void Application::paintGL() {
|
||||||
_lastFramesPerSecondUpdate = now;
|
_lastFramesPerSecondUpdate = now;
|
||||||
}
|
}
|
||||||
|
|
||||||
idle(now);
|
if (_isGLInitialized) {
|
||||||
|
idle(now);
|
||||||
|
}
|
||||||
|
|
||||||
PROFILE_RANGE(__FUNCTION__);
|
PROFILE_RANGE(__FUNCTION__);
|
||||||
PerformanceTimer perfTimer("paintGL");
|
PerformanceTimer perfTimer("paintGL");
|
||||||
|
|
|
@ -414,7 +414,7 @@ private:
|
||||||
|
|
||||||
bool _dependencyManagerIsSetup;
|
bool _dependencyManagerIsSetup;
|
||||||
|
|
||||||
OffscreenGlCanvas* _offscreenContext;
|
OffscreenGlCanvas* _offscreenContext { nullptr };
|
||||||
DisplayPluginPointer _displayPlugin;
|
DisplayPluginPointer _displayPlugin;
|
||||||
InputPluginList _activeInputPlugins;
|
InputPluginList _activeInputPlugins;
|
||||||
|
|
||||||
|
@ -548,6 +548,7 @@ private:
|
||||||
quint64 _lastSimsPerSecondUpdate = 0;
|
quint64 _lastSimsPerSecondUpdate = 0;
|
||||||
bool _isForeground = true; // starts out assumed to be in foreground
|
bool _isForeground = true; // starts out assumed to be in foreground
|
||||||
bool _inPaint = false;
|
bool _inPaint = false;
|
||||||
|
bool _isGLInitialized { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_Application_h
|
#endif // hifi_Application_h
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
/// Updates the state of the joint at the specified index.
|
/// Updates the state of the joint at the specified index.
|
||||||
void AvatarRig::updateJointState(int index, glm::mat4 rootTransform) {
|
void AvatarRig::updateJointState(int index, glm::mat4 rootTransform) {
|
||||||
if (index < 0 && index >= _jointStates.size()) {
|
if (index < 0 || index >= _jointStates.size()) {
|
||||||
return; // bail
|
return; // bail
|
||||||
}
|
}
|
||||||
JointState& state = _jointStates[index];
|
JointState& state = _jointStates[index];
|
||||||
|
|
|
@ -130,6 +130,9 @@ void SpacemouseManager::ManagerFocusOutEvent() {
|
||||||
instance->focusOutEvent();
|
instance->focusOutEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SpacemouseManager::init() {
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef HAVE_3DCONNEXIONCLIENT
|
#ifdef HAVE_3DCONNEXIONCLIENT
|
||||||
|
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
|
|
|
@ -11,8 +11,6 @@
|
||||||
#ifndef hifi_SpacemouseManager_h
|
#ifndef hifi_SpacemouseManager_h
|
||||||
#define hifi_SpacemouseManager_h
|
#define hifi_SpacemouseManager_h
|
||||||
|
|
||||||
#define HAVE_3DCONNEXIONCLIENT
|
|
||||||
|
|
||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QLibrary>
|
#include <QLibrary>
|
||||||
#include <controllers/UserInputMapper.h>
|
#include <controllers/UserInputMapper.h>
|
||||||
|
@ -27,7 +25,7 @@ class SpacemouseManager : public QObject {
|
||||||
public:
|
public:
|
||||||
static SpacemouseManager& getInstance();
|
static SpacemouseManager& getInstance();
|
||||||
void ManagerFocusOutEvent();
|
void ManagerFocusOutEvent();
|
||||||
void init() {};
|
void init();
|
||||||
void destroy() {};
|
void destroy() {};
|
||||||
bool Is3dmouseAttached() { return false; };
|
bool Is3dmouseAttached() { return false; };
|
||||||
public slots:
|
public slots:
|
||||||
|
@ -230,4 +228,4 @@ public:
|
||||||
void handleAxisEvent();
|
void handleAxisEvent();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // defined(hifi_SpacemouseManager_h)
|
#endif // defined(hifi_SpacemouseManager_h)
|
||||||
|
|
Loading…
Reference in a new issue