mirror of
https://github.com/nothings/stb
synced 2024-12-15 04:22:35 +03:00
stb_image.h: Only define stbi__l2h_{gamme,scale} when needed.
This fixes a (well, actually the only) compiler warning.
This commit is contained in:
parent
3f73dfd7ce
commit
8603c6e809
@ -1186,14 +1186,15 @@ STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void
|
||||
#endif
|
||||
}
|
||||
|
||||
static float stbi__h2l_gamma_i=1.0f/2.2f, stbi__h2l_scale_i=1.0f;
|
||||
#ifndef STBI_NO_LINEAR
|
||||
static float stbi__l2h_gamma=2.2f, stbi__l2h_scale=1.0f;
|
||||
|
||||
#ifndef STBI_NO_LINEAR
|
||||
STBIDEF void stbi_ldr_to_hdr_gamma(float gamma) { stbi__l2h_gamma = gamma; }
|
||||
STBIDEF void stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = scale; }
|
||||
#endif
|
||||
|
||||
static float stbi__h2l_gamma_i=1.0f/2.2f, stbi__h2l_scale_i=1.0f;
|
||||
|
||||
STBIDEF void stbi_hdr_to_ldr_gamma(float gamma) { stbi__h2l_gamma_i = 1/gamma; }
|
||||
STBIDEF void stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = 1/scale; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user