summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHanaxar <[email protected]>2022-06-23 13:23:14 +0300
committerGitHub <[email protected]>2022-06-23 12:23:14 +0200
commit6f231ea9ac0ae65eeb6a583eafaf8ffaf82f1986 (patch)
tree372402114cf6d89c19c9759101766eec2d583a1a
parentb1fb469e0dcb5c29d115bf9e7b716a79f28c26a3 (diff)
downloadraylib-6f231ea9ac0ae65eeb6a583eafaf8ffaf82f1986.tar.gz
raylib-6f231ea9ac0ae65eeb6a583eafaf8ffaf82f1986.zip
Fix signedness in rlBindImageTexture (#2539)
rlGetGlTextureFormats was expecting unsigned int, corrected variables according to that.
-rw-r--r--src/rlgl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 9de1fd6c..ae6e0496 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);