mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
More warning fixes
This commit is contained in:
parent
a07d7494f0
commit
f72eb679c6
5 changed files with 9 additions and 8 deletions
|
@ -15,7 +15,6 @@
|
|||
#include <deque>
|
||||
#include <forward_list>
|
||||
#include <functional>
|
||||
#include <GL/glew.h>
|
||||
#include <mutex>
|
||||
|
||||
#include <SharedUtil.h>
|
||||
|
|
|
@ -76,3 +76,6 @@ void OffscreenGLCanvas::doneCurrent() {
|
|||
_context->doneCurrent();
|
||||
}
|
||||
|
||||
QObject* OffscreenGLCanvas::getContextObject() {
|
||||
return _context;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,8 @@ public:
|
|||
QOpenGLContext* getContext() {
|
||||
return _context;
|
||||
}
|
||||
|
||||
QObject* getContextObject();
|
||||
|
||||
protected:
|
||||
std::once_flag _reportOnce;
|
||||
QOpenGLContext* _context;
|
||||
|
|
|
@ -17,15 +17,14 @@
|
|||
#include <QtQuick/QQuickRenderControl>
|
||||
#include <QtCore/QWaitCondition>
|
||||
#include <QtCore/QMutex>
|
||||
#include <QtGui/QOpenGLContext>
|
||||
|
||||
#include <shared/NsightHelpers.h>
|
||||
#include <PerfStat.h>
|
||||
#include <DependencyManager.h>
|
||||
#include <NumericalConstants.h>
|
||||
|
||||
#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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue