tinyexr: Sync with upstream 1.0.1

Removes miniz as a bundled dependency, relies on our own zlib instead.

Includes a couple commits ahead of `v1.0.1` tag to fix MinGW builds.
This commit is contained in:
Rémi Verschelde 2021-11-19 11:17:49 +01:00
parent a777f01052
commit 46d3effa99
No known key found for this signature in database
GPG key ID: C3336907360768E1
7 changed files with 1934 additions and 7188 deletions

View file

@ -20,6 +20,9 @@ env_tinyexr.Prepend(CPPPATH=[thirdparty_dir])
# Enable threaded loading with C++11.
env_tinyexr.Append(CPPDEFINES=["TINYEXR_USE_THREAD"])
# miniz is an external dependency, we could add it but we can instead rely
# on our existing bundled zlib.
env_tinyexr.Append(CPPDEFINES=[("TINYEXR_USE_MINIZ", 0)])
env_thirdparty = env_tinyexr.Clone()
env_thirdparty.disable_warnings()

View file

@ -33,6 +33,8 @@
#include "core/os/os.h"
#include "core/string/print_string.h"
#include <zlib.h> // Should come before including tinyexr.
#include "thirdparty/tinyexr/tinyexr.h"
Error ImageLoaderTinyEXR::load_image(Ref<Image> p_image, FileAccess *f, bool p_force_linear, float p_scale) {

View file

@ -31,6 +31,8 @@
#include "image_saver_tinyexr.h"
#include "core/math/math_funcs.h"
#include <zlib.h> // Should come before including tinyexr.
#include "thirdparty/tinyexr/tinyexr.h"
static bool is_supported_format(Image::Format p_format) {