diff options
| author | Ray <[email protected]> | 2017-05-08 12:50:24 +0200 |
|---|---|---|
| committer | Ray <[email protected]> | 2017-05-08 12:50:24 +0200 |
| commit | 35c6aff21f3935bbf950839b84925d4f1cb230bb (patch) | |
| tree | 648afefec295fd2b41b24eef0307a10aaa83068b /src/textures.c | |
| parent | 50c887cb0a0aa80eae78c56198cbfe29280102ea (diff) | |
| download | raylib-35c6aff21f3935bbf950839b84925d4f1cb230bb.tar.gz raylib-35c6aff21f3935bbf950839b84925d4f1cb230bb.zip | |
Corrected bug on HDR loading
Diffstat (limited to 'src/textures.c')
| -rw-r--r-- | src/textures.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/textures.c b/src/textures.c index 3c336587..115c8fff 100644 --- a/src/textures.c +++ b/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 |
