From 910c20334f9f435b292fd1d51ec2b57bfa90eda9 Mon Sep 17 00:00:00 2001 From: erwin coumans Date: Thu, 15 Apr 2021 20:26:01 -0700 Subject: [PATCH] disable texture release, it causes crashes, need to figure out better solution --- examples/OpenGLWindow/GLInstancingRenderer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/examples/OpenGLWindow/GLInstancingRenderer.cpp b/examples/OpenGLWindow/GLInstancingRenderer.cpp index 81f9ec8c6..ca0552230 100644 --- a/examples/OpenGLWindow/GLInstancingRenderer.cpp +++ b/examples/OpenGLWindow/GLInstancingRenderer.cpp @@ -398,14 +398,15 @@ void GLInstancingRenderer::removeAllInstances() m_data->m_publicGraphicsInstances.exitHandles(); m_data->m_publicGraphicsInstances.initHandles(); +#if 0 + //todo: cannot release ALL textures, since some handles are still kept, and it would cause a crash for (int i=0;im_textureHandles.size();i++) { InternalTextureHandle& h = m_data->m_textureHandles[i]; glDeleteTextures(1, &h.m_glTexture); } - m_data->m_textureHandles.clear(); - +#endif } GLInstancingRenderer::~GLInstancingRenderer()