1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-07 03:13:49 +00:00

Fix crash in init2DTexture when glBindImageTexture is null

This commit is contained in:
Sergey Lipskiy 2017-01-17 13:23:37 +07:00
parent 2304d9dd7b
commit 5757b646f3

View File

@ -57,7 +57,7 @@ namespace opengl {
void init2DTexture(const graphics::Context::InitTextureParams & _params) override
{
if (_params.msaaLevel == 0) {
if (_params.ImageUnit.isValid())
if (_params.ImageUnit.isValid() && glBindImageTexture != nullptr)
glBindImageTexture(GLuint(_params.ImageUnit), 0,
0, GL_FALSE, GL_FALSE, GL_READ_ONLY, GLuint(_params.internalFormat));