Skip to content

Commit

Permalink
assign format to cubemap (#3823)
Browse files Browse the repository at this point in the history
  • Loading branch information
GaryMcWhorter authored Feb 26, 2024
1 parent 6db5bb5 commit 53cfc7c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/rtextures.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 53cfc7c

Please sign in to comment.