From 151cfa83948f98e294a15f4886813937a11c0e5b Mon Sep 17 00:00:00 2001 From: Nikolas Date: Thu, 23 Jan 2025 21:04:50 +0100 Subject: [PATCH] [rtextures] Only build cubemap mipmaps when necessary --- src/rtextures.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/rtextures.c b/src/rtextures.c index 9dfc24738..beecea76c 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -4208,8 +4208,11 @@ TextureCubemap LoadTextureCubemap(Image image, int layout) Image mipmapped = ImageCopy(image); #if defined(SUPPORT_IMAGE_MANIPULATION) - ImageMipmaps(&mipmapped); - ImageMipmaps(&faces); + if (image.mipmaps > 1) + { + ImageMipmaps(&mipmapped); + ImageMipmaps(&faces); + } #endif // NOTE: Image formatting does not work with compressed textures