diff options
| author | raysan5 <raysan5@gmail.com> | 2019-09-14 20:07:44 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2019-09-14 20:07:44 +0200 |
| commit | 112874fe07ae896bf068b20430489f6665b611f5 (patch) | |
| tree | 43eedc82ec063bdb9801ccdcea564d662d3cffd7 | |
| parent | c10348cc85ffbe57e36e60693fa1f51375aefde0 (diff) | |
| download | raylib-112874fe07ae896bf068b20430489f6665b611f5.tar.gz raylib-112874fe07ae896bf068b20430489f6665b611f5.zip | |
Review issue with HDR pixels loading
| -rw-r--r-- | src/textures.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/textures.c b/src/textures.c index 8f5b5c97..70e4a0e9 100644 --- a/src/textures.c +++ b/src/textures.c @@ -253,13 +253,10 @@ Image LoadImage(const char *fileName) FILE *imFile = fopen(fileName, "rb"); - stbi_set_flip_vertically_on_load(true); - // Load 32 bit per channel floats data + //stbi_set_flip_vertically_on_load(true); image.data = stbi_loadf_from_file(imFile, &image.width, &image.height, &imgBpp, 0); - stbi_set_flip_vertically_on_load(false); - fclose(imFile); image.mipmaps = 1; @@ -551,7 +548,7 @@ Color *GetImageData(Image image) pixels[i].a = 255; k += 3; - } + } break; case UNCOMPRESSED_R32G32B32A32: { pixels[i].r = (unsigned char)(((float *)image.data)[k]*255.0f); @@ -560,7 +557,7 @@ Color *GetImageData(Image image) pixels[i].a = (unsigned char)(((float *)image.data)[k]*255.0f); k += 4; - } + } break; default: break; } } |
