Pārlūkot izejas kodu

assign format to cubemap (#3823)

pull/3839/head
Gary M pirms 9 mēnešiem
committed by GitHub
vecāks
revīzija
53cfc7c965
Šim parakstam datu bāzē netika atrasta zināma atslēga GPG atslēgas ID: B5690EEEBB952194
1 mainītis faili ar 9 papildinājumiem un 2 dzēšanām
  1. +9
    -2
      src/rtextures.c

+ 9
- 2
src/rtextures.c Parādīt failu

@ -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);
}

Notiek ielāde…
Atcelt
Saglabāt