diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-11 16:17:15 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-11 16:17:15 +0200 |
commit | 646d59e7134f9bbf98dd71ca4eb16cdea7c929e9 (patch) | |
tree | 901221ee73f4da1870e76cb528dab239777e87a9 /scene | |
parent | 6d534f6e89cfa318d5cf530b93fe2864ea983f6e (diff) | |
parent | 457e78a0bc0168491feedf945b76300993d3f33c (diff) |
Merge pull request #63271 from Chaosus/fix_texture_error
Fix error emitting when opening some textures in the inspector
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/texture.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/resources/texture.h b/scene/resources/texture.h index 4e529de8ee..9a9f0ad1af 100644 --- a/scene/resources/texture.h +++ b/scene/resources/texture.h @@ -238,7 +238,7 @@ private: Error _load_data(const String &p_path, int &r_width, int &r_height, Ref<Image> &image, bool &r_request_3d, bool &r_request_normal, bool &r_request_roughness, int &mipmap_limit, int p_size_limit = 0); String path_to_file; mutable RID texture; - Image::Format format = Image::FORMAT_MAX; + Image::Format format = Image::FORMAT_L8; int w = 0; int h = 0; mutable Ref<BitMap> alpha_cache; @@ -415,7 +415,7 @@ class ImageTextureLayered : public TextureLayered { LayeredType layered_type; mutable RID texture; - Image::Format format = Image::FORMAT_MAX; + Image::Format format = Image::FORMAT_L8; int width = 0; int height = 0; @@ -495,7 +495,7 @@ private: Error _load_data(const String &p_path, Vector<Ref<Image>> &images, int &mipmap_limit, int p_size_limit = 0); String path_to_file; mutable RID texture; - Image::Format format = Image::FORMAT_MAX; + Image::Format format = Image::FORMAT_L8; int w = 0; int h = 0; int layers = 0; @@ -587,7 +587,7 @@ class ImageTexture3D : public Texture3D { mutable RID texture; - Image::Format format = Image::FORMAT_MAX; + Image::Format format = Image::FORMAT_L8; int width = 1; int height = 1; int depth = 1; @@ -641,7 +641,7 @@ private: Error _load_data(const String &p_path, Vector<Ref<Image>> &r_data, Image::Format &r_format, int &r_width, int &r_height, int &r_depth, bool &r_mipmaps); String path_to_file; mutable RID texture; - Image::Format format = Image::FORMAT_MAX; + Image::Format format = Image::FORMAT_L8; int w = 0; int h = 0; int d = 0; |