diff options
| author | raysan5 <[email protected]> | 2021-07-30 11:56:14 +0200 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2021-07-30 11:56:14 +0200 |
| commit | bd70a224127207e1483eda4538cc482c9c7f49a0 (patch) | |
| tree | 12a16487633d1e3b8b7856d51b0fd04a96a278df /src/rlgl.h | |
| parent | 8b7f43f89b88c75f7353fe85f7cb6465ad6be7b5 (diff) | |
| download | raylib-bd70a224127207e1483eda4538cc482c9c7f49a0.tar.gz raylib-bd70a224127207e1483eda4538cc482c9c7f49a0.zip | |
Review some issues
Diffstat (limited to 'src/rlgl.h')
| -rw-r--r-- | src/rlgl.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -2968,7 +2968,7 @@ void *rlReadTexturePixels(unsigned int id, int width, int height, int format) glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, id, 0); // We read data as RGBA because FBO texture is configured as RGBA, despite binding another texture format - pixels = (unsigned char *)RL_MALLOC(rlGetPixelDataSize(texture.width, texture.height, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)); + pixels = (unsigned char *)RL_MALLOC(rlGetPixelDataSize(width, height, PIXELFORMAT_UNCOMPRESSED_R8G8B8A8)); glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, pixels); glBindFramebuffer(GL_FRAMEBUFFER, 0); |
