summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGary M <[email protected]>2024-02-26 01:26:39 -0800
committerGitHub <[email protected]>2024-02-26 10:26:39 +0100
commit53cfc7c96564fad3319d642c58e74ce37e49efbc (patch)
tree0cf437c35171ee62e03b34420e2c1e92faaa2dbc /src
parent6db5bb5ccd9e609b786b41c668031f5dfbd332d1 (diff)
downloadraylib-53cfc7c96564fad3319d642c58e74ce37e49efbc.tar.gz
raylib-53cfc7c96564fad3319d642c58e74ce37e49efbc.zip
assign format to cubemap (#3823)
Diffstat (limited to 'src')
-rw-r--r--src/rtextures.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/rtextures.c b/src/rtextures.c
index 97d9e385..efa91df9 100644
--- a/src/rtextures.c
+++ b/src/rtextures.c
@@ -3874,8 +3874,15 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
// NOTE: Cubemap data is expected to be provided as 6 images in a single data array,
// one after the other (that's a vertical image), following convention: +X, -X, +Y, -Y, +Z, -Z
cubemap.id = rlLoadTextureCubemap(faces.data, size, faces.format);
- if (cubemap.id == 0) TRACELOG(LOG_WARNING, "IMAGE: Failed to load cubemap image");
- else cubemap.mipmaps = 1;
+ if (cubemap.id == 0)
+ {
+ TRACELOG(LOG_WARNING, "IMAGE: Failed to load cubemap image");
+ }
+ else
+ {
+ cubemap.format = faces.format;
+ cubemap.mipmaps = 1;
+ }
UnloadImage(faces);
}