You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Make ImageLoader take bit field flags
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
#include "core/os/os.h"
|
||||
#include "core/string/print_string.h"
|
||||
|
||||
Error ImageLoaderHDR::load_image(Ref<Image> p_image, Ref<FileAccess> f, bool p_force_linear, float p_scale) {
|
||||
Error ImageLoaderHDR::load_image(Ref<Image> p_image, Ref<FileAccess> f, uint32_t p_flags, float p_scale) {
|
||||
String header = f->get_token();
|
||||
|
||||
ERR_FAIL_COND_V_MSG(header != "#?RADIANCE" && header != "#?RGBE", ERR_FILE_UNRECOGNIZED, "Unsupported header information in HDR: " + header + ".");
|
||||
@@ -131,7 +131,7 @@ Error ImageLoaderHDR::load_image(Ref<Image> p_image, Ref<FileAccess> f, bool p_f
|
||||
ptr[1] * exp / 255.0,
|
||||
ptr[2] * exp / 255.0);
|
||||
|
||||
if (p_force_linear) {
|
||||
if (p_flags & FLAG_FORCE_LINEAR) {
|
||||
c = c.srgb_to_linear();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user