From c27ee634ea4ebc866c912ef01459305395cfae22 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Thu, 20 Oct 2016 13:56:01 -0700 Subject: [PATCH] Fix debug compile issues --- libraries/gl/src/gl/OffscreenQmlSurface.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libraries/gl/src/gl/OffscreenQmlSurface.cpp b/libraries/gl/src/gl/OffscreenQmlSurface.cpp index 4622646f22..c45a3323db 100644 --- a/libraries/gl/src/gl/OffscreenQmlSurface.cpp +++ b/libraries/gl/src/gl/OffscreenQmlSurface.cpp @@ -55,12 +55,12 @@ class OffscreenTextures { public: GLuint getNextTexture(const uvec2& size) { assert(QThread::currentThread() == qApp->thread()); - assert(textures.count(size)); recycle(); ++_activeTextureCount; auto sizeKey = uvec2ToUint64(size); + assert(_textures.count(sizeKey)); auto& textureSet = _textures[sizeKey]; if (!textureSet.returnedTextures.empty()) { auto textureAndFence = textureSet.returnedTextures.front(); @@ -73,10 +73,9 @@ public: } void releaseSize(const uvec2& size) { - assert(QOpenGLContext::currentContext()); assert(QThread::currentThread() == qApp->thread()); - assert(textures.count(size)); auto sizeKey = uvec2ToUint64(size); + assert(_textures.count(sizeKey)); auto& textureSet = _textures[sizeKey]; if (0 == --textureSet.count) { for (const auto& textureAndFence : textureSet.returnedTextures) { @@ -88,7 +87,6 @@ public: void acquireSize(const uvec2& size) { assert(QThread::currentThread() == qApp->thread()); - assert(textures.count(size)); auto sizeKey = uvec2ToUint64(size); auto& textureSet = _textures[sizeKey]; ++textureSet.count; @@ -241,6 +239,7 @@ Q_LOGGING_CATEGORY(offscreenFocus, "hifi.offscreen.focus") void OffscreenQmlSurface::cleanup() { _canvas->makeCurrent(); + _renderControl->invalidate(); delete _renderControl; // and invalidate if (_depthStencil) {