mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Don't use glBindImageTexture when glTexStorage2D is not supported
glBindImageTexture requires an immutable texture object
This commit is contained in:
parent
3b1dd92118
commit
a480f28fc2
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue
Block a user