From de24a6c1eba456ffcc0d572a1949a1352db0f7c3 Mon Sep 17 00:00:00 2001 From: Leonardo Gomes Date: Mon, 27 Jul 2026 11:29:32 -0300 Subject: [PATCH] fix: use rlGetPixelDataSize in rlgl.h (#6024) --- src/rlgl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rlgl.h b/src/rlgl.h index be24bbb78..44341137e 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -3755,7 +3755,7 @@ void *rlReadTexturePixels(unsigned int id, int width, int height, int format) glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); #else // Reading data as original texture format, in some platforms (RPI, Wasm) it works - pixels = (unsigned char *)RL_MALLOC(GetPixelDataSize(width, height, format)); + pixels = (unsigned char *)RL_MALLOC(rlGetPixelDataSize(width, height, format)); unsigned int glInternalFormat = 0, glFormat = 0, glType = 0; rlGetGlTextureFormats(format, &glInternalFormat, &glFormat, &glType); glReadPixels(0, 0, width, height, glFormat, glType, pixels);