From 6f231ea9ac0ae65eeb6a583eafaf8ffaf82f1986 Mon Sep 17 00:00:00 2001 From: Hanaxar <87268284+hanaxar@users.noreply.github.com> Date: Thu, 23 Jun 2022 13:23:14 +0300 Subject: [PATCH] Fix signedness in rlBindImageTexture (#2539) rlGetGlTextureFormats was expecting unsigned int, corrected variables according to that. --- src/rlgl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rlgl.h b/src/rlgl.h index 9de1fd6cf..ae6e04967 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -4010,7 +4010,7 @@ void rlCopyBuffersElements(unsigned int destId, unsigned int srcId, unsigned lon void rlBindImageTexture(unsigned int id, unsigned int index, unsigned int format, int readonly) { #if defined(GRAPHICS_API_OPENGL_43) - int glInternalFormat = 0, glFormat = 0, glType = 0; + unsigned int glInternalFormat = 0, glFormat = 0, glType = 0; rlGetGlTextureFormats(format, &glInternalFormat, &glFormat, &glType); glBindImageTexture(index, id, 0, 0, 0, readonly ? GL_READ_ONLY : GL_READ_WRITE, glInternalFormat);