瀏覽代碼

Corrected bug on HDR loading

pull/282/head
Ray 8 年之前
父節點
當前提交
35c6aff21f
共有 1 個檔案被更改,包括 6 行新增2 行删除
  1. +6
    -2
      src/textures.c

+ 6
- 2
src/textures.c 查看文件

@ -212,9 +212,13 @@ Image LoadImage(const char *fileName)
int imgBpp = 0;
FILE *imFile = fopen(fileName, "rb");
// Load 32 bit per channel floats data
image.data = stbi_loadf(imFile, &image.width, &image.height, &imgBpp, 0);
image.data = stbi_loadf_from_file(imFile, &image.width, &image.height, &imgBpp, 0);
fclose(imFile);
image.mipmaps = 1;
if (imgBpp == 3) image.format = UNCOMPRESSED_R32G32B32;
else

Loading…
取消
儲存