Commit e768f1fc authored by Johan Helsing's avatar Johan Helsing
Browse files

Stop leaking texture handles

parent b9fcc378
......@@ -44,7 +44,12 @@ QDemonRenderTexture2D::QDemonRenderTexture2D(const QDemonRef<QDemonRenderContext
: QDemonRenderTextureBase(context, QDemonRenderTextureTargetType::Texture2D), m_width(qsgTexture->textureSize().width()), m_height(qsgTexture->textureSize().height())
qDebug() << "NEW FROM QSGTEXTURE" << this;
// Q_ASSERT(!m_handle); // TODO: don't leak texture handles
// TODO: Avoid generating a texture handle in the first place
m_handle = nullptr;
m_handle = reinterpret_cast<QDemonRenderBackend::QDemonRenderBackendTextureObject>(qsgTexture->textureId());
m_ownsTexture = false;
// m_handle = reinterpret_cast<QDemonRenderBackend::QDemonRenderBackendTextureObject>(1);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment