diff --git a/libraries/gl/src/gl/GLEscrow.h b/libraries/gl/src/gl/GLEscrow.h index d860f1239c..511dec6a10 100644 --- a/libraries/gl/src/gl/GLEscrow.h +++ b/libraries/gl/src/gl/GLEscrow.h @@ -15,7 +15,6 @@ #include #include #include -#include #include #include diff --git a/libraries/gl/src/gl/OffscreenGLCanvas.cpp b/libraries/gl/src/gl/OffscreenGLCanvas.cpp index 640c8ed5f5..6ce80296e9 100644 --- a/libraries/gl/src/gl/OffscreenGLCanvas.cpp +++ b/libraries/gl/src/gl/OffscreenGLCanvas.cpp @@ -76,3 +76,6 @@ void OffscreenGLCanvas::doneCurrent() { _context->doneCurrent(); } +QObject* OffscreenGLCanvas::getContextObject() { + return _context; +} diff --git a/libraries/gl/src/gl/OffscreenGLCanvas.h b/libraries/gl/src/gl/OffscreenGLCanvas.h index e278f550f0..0f02e7c76f 100644 --- a/libraries/gl/src/gl/OffscreenGLCanvas.h +++ b/libraries/gl/src/gl/OffscreenGLCanvas.h @@ -29,7 +29,8 @@ public: QOpenGLContext* getContext() { return _context; } - + QObject* getContextObject(); + protected: std::once_flag _reportOnce; QOpenGLContext* _context; diff --git a/libraries/gl/src/gl/OffscreenQmlSurface.cpp b/libraries/gl/src/gl/OffscreenQmlSurface.cpp index d30294ae7c..bddc7d19ae 100644 --- a/libraries/gl/src/gl/OffscreenQmlSurface.cpp +++ b/libraries/gl/src/gl/OffscreenQmlSurface.cpp @@ -17,15 +17,14 @@ #include #include #include -#include #include #include #include #include -#include "GLEscrow.h" #include "OffscreenGLCanvas.h" +#include "GLEscrow.h" // Time between receiving a request to render the offscreen UI actually triggering @@ -60,7 +59,6 @@ static const QEvent::Type INIT = QEvent::Type(QEvent::User + 1); static const QEvent::Type RENDER = QEvent::Type(QEvent::User + 2); static const QEvent::Type RESIZE = QEvent::Type(QEvent::User + 3); static const QEvent::Type STOP = QEvent::Type(QEvent::User + 4); -static const QEvent::Type UPDATE = QEvent::Type(QEvent::User + 5); class OffscreenQmlRenderer : public OffscreenGLCanvas { friend class OffscreenQmlSurface; @@ -84,7 +82,7 @@ public: // Qt 5.5 _renderControl->prepareThread(&_thread); - _context->moveToThread(&_thread); + getContextObject()->moveToThread(&_thread); moveToThread(&_thread); _thread.setObjectName("QML Thread"); _thread.start(); @@ -176,7 +174,7 @@ private: doneCurrent(); - _context->moveToThread(QCoreApplication::instance()->thread()); + getContextObject()->moveToThread(QCoreApplication::instance()->thread()); _cond.wakeOne(); } diff --git a/libraries/octree/src/OctreeQuery.cpp b/libraries/octree/src/OctreeQuery.cpp index 5a30e178f8..0e7f565c00 100644 --- a/libraries/octree/src/OctreeQuery.cpp +++ b/libraries/octree/src/OctreeQuery.cpp @@ -109,7 +109,7 @@ int OctreeQuery::parseData(ReceivedMessage& message) { auto bytesRead = sourceBuffer - startPosition; auto bytesLeft = message.getSize() - bytesRead; - if (bytesLeft >= sizeof(_keyholeRadius)) { + if (bytesLeft >= (int)sizeof(_keyholeRadius)) { memcpy(&_keyholeRadius, sourceBuffer, sizeof(_keyholeRadius)); sourceBuffer += sizeof(_keyholeRadius); }