mirror of
https://github.com/lubosz/overte.git
synced 2025-04-23 19:34:02 +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.";
|
||||
|
||||
// initialize glut for shape drawing; Qt apparently initializes it on OS X
|
||||
#ifndef __APPLE__
|
||||
static bool isInitialized = false;
|
||||
if (isInitialized) {
|
||||
if (_isGLInitialized) {
|
||||
return;
|
||||
} else {
|
||||
isInitialized = true;
|
||||
_isGLInitialized = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Where the gpuContext is initialized and where the TRUE Backend is created and assigned
|
||||
gpu::Context::init<gpu::GLBackend>();
|
||||
_gpuContext = std::make_shared<gpu::Context>();
|
||||
|
@ -1057,7 +1055,9 @@ void Application::paintGL() {
|
|||
_lastFramesPerSecondUpdate = now;
|
||||
}
|
||||
|
||||
idle(now);
|
||||
if (_isGLInitialized) {
|
||||
idle(now);
|
||||
}
|
||||
|
||||
PROFILE_RANGE(__FUNCTION__);
|
||||
PerformanceTimer perfTimer("paintGL");
|
||||
|
|
|
@ -414,7 +414,7 @@ private:
|
|||
|
||||
bool _dependencyManagerIsSetup;
|
||||
|
||||
OffscreenGlCanvas* _offscreenContext;
|
||||
OffscreenGlCanvas* _offscreenContext { nullptr };
|
||||
DisplayPluginPointer _displayPlugin;
|
||||
InputPluginList _activeInputPlugins;
|
||||
|
||||
|
@ -548,6 +548,7 @@ private:
|
|||
quint64 _lastSimsPerSecondUpdate = 0;
|
||||
bool _isForeground = true; // starts out assumed to be in foreground
|
||||
bool _inPaint = false;
|
||||
bool _isGLInitialized { false };
|
||||
};
|
||||
|
||||
#endif // hifi_Application_h
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
/// Updates the state of the joint at the specified index.
|
||||
void AvatarRig::updateJointState(int index, glm::mat4 rootTransform) {
|
||||
if (index < 0 && index >= _jointStates.size()) {
|
||||
if (index < 0 || index >= _jointStates.size()) {
|
||||
return; // bail
|
||||
}
|
||||
JointState& state = _jointStates[index];
|
||||
|
|
|
@ -130,6 +130,9 @@ void SpacemouseManager::ManagerFocusOutEvent() {
|
|||
instance->focusOutEvent();
|
||||
}
|
||||
|
||||
void SpacemouseManager::init() {
|
||||
}
|
||||
|
||||
#ifdef HAVE_3DCONNEXIONCLIENT
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
|
|
|
@ -11,8 +11,6 @@
|
|||
#ifndef hifi_SpacemouseManager_h
|
||||
#define hifi_SpacemouseManager_h
|
||||
|
||||
#define HAVE_3DCONNEXIONCLIENT
|
||||
|
||||
#include <QObject>
|
||||
#include <QLibrary>
|
||||
#include <controllers/UserInputMapper.h>
|
||||
|
@ -27,7 +25,7 @@ class SpacemouseManager : public QObject {
|
|||
public:
|
||||
static SpacemouseManager& getInstance();
|
||||
void ManagerFocusOutEvent();
|
||||
void init() {};
|
||||
void init();
|
||||
void destroy() {};
|
||||
bool Is3dmouseAttached() { return false; };
|
||||
public slots:
|
||||
|
@ -230,4 +228,4 @@ public:
|
|||
void handleAxisEvent();
|
||||
};
|
||||
|
||||
#endif // defined(hifi_SpacemouseManager_h)
|
||||
#endif // defined(hifi_SpacemouseManager_h)
|
||||
|
|
Loading…
Reference in a new issue