[rtextures] Load cubemap mipmaps

This commit is contained in:
Not-Nik 2024-10-24 19:15:27 +02:00
parent db3e68605f
commit 5a66053bc6
No known key found for this signature in database
GPG Key ID: E95F679E3CDD9784

View File

@ -4201,6 +4201,9 @@ TextureCubemap LoadTextureCubemap(Image image, int layout)
faces = GenImageColor(size, size*6, MAGENTA); faces = GenImageColor(size, size*6, MAGENTA);
ImageFormat(&faces, image.format); ImageFormat(&faces, image.format);
ImageMipmaps(&image);
ImageMipmaps(&faces);
// NOTE: Image formatting does not work with compressed textures // NOTE: Image formatting does not work with compressed textures
for (int i = 0; i < 6; i++) ImageDraw(&faces, image, faceRecs[i], (Rectangle){ 0, (float)size*i, (float)size, (float)size }, WHITE); for (int i = 0; i < 6; i++) ImageDraw(&faces, image, faceRecs[i], (Rectangle){ 0, (float)size*i, (float)size, (float)size }, WHITE);