浏览代码

assign format to cubemap (#3823)

pull/3839/head
Gary M 1年前
committed by GitHub
父节点
当前提交
53cfc7c965
找不到此签名对应的密钥 GPG 密钥 ID: B5690EEEBB952194
共有 1 个文件被更改,包括 9 次插入2 次删除
  1. +9
    -2
      src/rtextures.c

+ 9
- 2
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, // 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 // 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); cubemap.id = rlLoadTextureCubemap(faces.data, size, faces.format);
if (cubemap.id == 0) TRACELOG(LOG_WARNING, "IMAGE: Failed to load cubemap image"); if (cubemap.id == 0)
else cubemap.mipmaps = 1; {
TRACELOG(LOG_WARNING, "IMAGE: Failed to load cubemap image");
}
else
{
cubemap.format = faces.format;
cubemap.mipmaps = 1;
}
UnloadImage(faces); UnloadImage(faces);
} }

||||||
x
 
000:0
正在加载...
取消
保存