Merge branch 'master' of https://github.com/svdijk/stb into working
This commit is contained in:
commit
c7e24f4c4c
@ -461,12 +461,12 @@ STBIDEF stbi_uc *stbi_load_from_file (FILE *f, int *x, int *y,
|
|||||||
#ifndef STBI_NO_HDR
|
#ifndef STBI_NO_HDR
|
||||||
STBIDEF void stbi_hdr_to_ldr_gamma(float gamma);
|
STBIDEF void stbi_hdr_to_ldr_gamma(float gamma);
|
||||||
STBIDEF void stbi_hdr_to_ldr_scale(float scale);
|
STBIDEF void stbi_hdr_to_ldr_scale(float scale);
|
||||||
#endif
|
#endif // STBI_NO_HDR
|
||||||
|
|
||||||
#ifndef STBI_NO_LINEAR
|
#ifndef STBI_NO_LINEAR
|
||||||
STBIDEF void stbi_ldr_to_hdr_gamma(float gamma);
|
STBIDEF void stbi_ldr_to_hdr_gamma(float gamma);
|
||||||
STBIDEF void stbi_ldr_to_hdr_scale(float scale);
|
STBIDEF void stbi_ldr_to_hdr_scale(float scale);
|
||||||
#endif // STBI_NO_HDR
|
#endif // STBI_NO_LINEAR
|
||||||
|
|
||||||
// stbi_is_hdr is always defined, but always returns false if STBI_NO_HDR
|
// stbi_is_hdr is always defined, but always returns false if STBI_NO_HDR
|
||||||
STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user);
|
STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void *user);
|
||||||
@ -1186,14 +1186,15 @@ STBIDEF int stbi_is_hdr_from_callbacks(stbi_io_callbacks const *clbk, void
|
|||||||
#endif
|
#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;
|
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_gamma(float gamma) { stbi__l2h_gamma = gamma; }
|
||||||
STBIDEF void stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = scale; }
|
STBIDEF void stbi_ldr_to_hdr_scale(float scale) { stbi__l2h_scale = scale; }
|
||||||
#endif
|
#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_gamma(float gamma) { stbi__h2l_gamma_i = 1/gamma; }
|
||||||
STBIDEF void stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = 1/scale; }
|
STBIDEF void stbi_hdr_to_ldr_scale(float scale) { stbi__h2l_scale_i = 1/scale; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user