From 59bd6778a2ecd3c14789922f66cf48e7e09cf5f4 Mon Sep 17 00:00:00 2001 From: Gary M Date: Sat, 24 Feb 2024 11:03:26 -0800 Subject: [PATCH] assign format to cubemap --- src/rtextures.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/rtextures.c b/src/rtextures.c index 97d9e3858..efa91df91 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); }