1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-18 14:21:41 +00:00

Add support for extending GLTF with more texture formats & support WebP

This commit is contained in:
Aaron Franke
2023-05-09 21:28:40 -05:00
parent d5c1b9f883
commit 7da93a0bc0
12 changed files with 361 additions and 187 deletions

View File

@@ -40,10 +40,10 @@
#include <webp/decode.h>
#include <webp/encode.h>
static Ref<Image> _webp_mem_loader_func(const uint8_t *p_png, int p_size) {
static Ref<Image> _webp_mem_loader_func(const uint8_t *p_webp_data, int p_size) {
Ref<Image> img;
img.instantiate();
Error err = WebPCommon::webp_load_image_from_buffer(img.ptr(), p_png, p_size);
Error err = WebPCommon::webp_load_image_from_buffer(img.ptr(), p_webp_data, p_size);
ERR_FAIL_COND_V(err, Ref<Image>());
return img;
}