From a480f28fc2cc118a62893bdf22483ad0753df2b7 Mon Sep 17 00:00:00 2001 From: Francisco Zurita Date: Sun, 29 Jan 2017 14:57:47 -0500 Subject: [PATCH] Don't use glBindImageTexture when glTexStorage2D is not supported glBindImageTexture requires an immutable texture object --- .../opengl_TextureManipulationObjectFactory.cpp | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Graphics/OpenGLContext/opengl_TextureManipulationObjectFactory.cpp b/src/Graphics/OpenGLContext/opengl_TextureManipulationObjectFactory.cpp index 620ba950..223a25fc 100644 --- a/src/Graphics/OpenGLContext/opengl_TextureManipulationObjectFactory.cpp +++ b/src/Graphics/OpenGLContext/opengl_TextureManipulationObjectFactory.cpp @@ -57,9 +57,6 @@ namespace opengl { void init2DTexture(const graphics::Context::InitTextureParams & _params) override { if (_params.msaaLevel == 0) { - if (_params.ImageUnit.isValid() && glBindImageTexture != nullptr) - glBindImageTexture(GLuint(_params.ImageUnit), 0, - 0, GL_FALSE, GL_FALSE, GL_READ_ONLY, GLuint(_params.internalFormat)); m_bind->bind(_params.textureUnitIndex, graphics::textureTarget::TEXTURE_2D, _params.handle); glTexImage2D(GL_TEXTURE_2D, @@ -71,10 +68,6 @@ namespace opengl { GLenum(_params.format), GLenum(_params.dataType), _params.data); - - if (_params.ImageUnit.isValid() && glBindImageTexture != nullptr) - glBindImageTexture(GLuint(_params.ImageUnit), GLuint(_params.handle), - 0, GL_FALSE, GL_FALSE, GL_READ_ONLY, GLuint(_params.internalFormat)); } else { m_bind->bind(_params.textureUnitIndex, graphics::textureTarget::TEXTURE_2D_MULTISAMPLE, _params.handle); glTexImage2DMultisample(GL_TEXTURE_2D_MULTISAMPLE,