diff --git a/src/opengl/gltexture.cpp b/src/opengl/gltexture.cpp index 02c5732056..cd8ca155f5 100644 --- a/src/opengl/gltexture.cpp +++ b/src/opengl/gltexture.cpp @@ -353,17 +353,6 @@ GLenum GLTexture::internalFormat() const return d->m_internalFormat; } -void GLTexture::clear() -{ - Q_ASSERT(d->m_owning); - GLFramebuffer fbo(this); - GLFramebuffer::pushFramebuffer(&fbo); - glClearColor(0, 0, 0, 0); - glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, d->m_texture, 0); - glClear(GL_COLOR_BUFFER_BIT); - GLFramebuffer::popFramebuffer(); -} - bool GLTexture::isDirty() const { return d->m_markedDirty; diff --git a/src/opengl/gltexture.h b/src/opengl/gltexture.h index 43c63a0f37..9a89974df1 100644 --- a/src/opengl/gltexture.h +++ b/src/opengl/gltexture.h @@ -98,10 +98,6 @@ public: QImage toImage(); - /** @short - * Make the texture fully transparent - */ - void clear(); /** * @deprecated track modifications to the texture yourself */ diff --git a/src/scene/workspacescene_opengl.cpp b/src/scene/workspacescene_opengl.cpp index 5db1a7f925..e8b3b1f598 100644 --- a/src/scene/workspacescene_opengl.cpp +++ b/src/scene/workspacescene_opengl.cpp @@ -472,7 +472,6 @@ void SceneOpenGLDecorationRenderer::resizeTexture() m_texture->setContentTransform(OutputTransform::FlipY); m_texture->setFilter(GL_LINEAR); m_texture->setWrapMode(GL_CLAMP_TO_EDGE); - m_texture->clear(); } else { m_texture.reset(); }