mirror of
https://github.com/overte-org/overte.git
synced 2025-04-25 12:33:27 +02:00
Fix QOpenGL warning
This commit is contained in:
parent
18198cb6fb
commit
f8ee377f01
3 changed files with 9 additions and 3 deletions
|
@ -45,7 +45,7 @@
|
|||
#include <QtNetwork/QNetworkDiskCache>
|
||||
|
||||
#include <gl/Config.h>
|
||||
#include <QtGui/QOpenGLContext>
|
||||
#include <QOpenGLContextWrapper.h>
|
||||
|
||||
#include <AccountManager.h>
|
||||
#include <AddressManager.h>
|
||||
|
@ -1397,13 +1397,13 @@ void Application::paintGL() {
|
|||
_lockedFramebufferMap[finalTexture] = scratchFramebuffer;
|
||||
|
||||
uint64_t displayStart = usecTimestampNow();
|
||||
Q_ASSERT(QOpenGLContext::currentContext() == _offscreenContext->getContext());
|
||||
Q_ASSERT(isCurrentContext(_offscreenContext->getContext()));
|
||||
{
|
||||
PROFILE_RANGE(__FUNCTION__ "/pluginSubmitScene");
|
||||
PerformanceTimer perfTimer("pluginSubmitScene");
|
||||
displayPlugin->submitSceneTexture(_frameCount, finalTexture, toGlm(size));
|
||||
}
|
||||
Q_ASSERT(QOpenGLContext::currentContext() == _offscreenContext->getContext());
|
||||
Q_ASSERT(isCurrentContext(_offscreenContext->getContext()));
|
||||
|
||||
uint64_t displayEnd = usecTimestampNow();
|
||||
const float displayPeriodUsec = (float)(displayEnd - displayStart); // usecs
|
||||
|
|
|
@ -37,4 +37,8 @@ bool QOpenGLContextWrapper::makeCurrent(QSurface* surface) {
|
|||
|
||||
void QOpenGLContextWrapper::doneCurrent() {
|
||||
_context->doneCurrent();
|
||||
}
|
||||
|
||||
bool isCurrentContext(QOpenGLContext* context) {
|
||||
return QOpenGLContext::currentContext() == context;
|
||||
}
|
|
@ -30,4 +30,6 @@ private:
|
|||
QOpenGLContext* _context { nullptr };
|
||||
};
|
||||
|
||||
bool isCurrentContext(QOpenGLContext* context);
|
||||
|
||||
#endif // hifi_QOpenGLContextWrapper_h
|
Loading…
Reference in a new issue