summaryrefslogtreecommitdiff
path: root/modules/dds
diff options
context:
space:
mode:
authorkobewi <kobewi4e@gmail.com>2022-05-04 01:49:20 +0200
committerkobewi <kobewi4e@gmail.com>2022-07-08 13:40:47 +0200
commitd2900429e81175a9f48240b180f1d8e3ab52865c (patch)
tree9a22ed1cd2ecea275dac8e9420d7a1d56c661382 /modules/dds
parentca18a02e00f7009d084c55b7e9de17df634f3d47 (diff)
Add static methods for creating Image and ImageTexture
Diffstat (limited to 'modules/dds')
-rw-r--r--modules/dds/texture_loader_dds.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/modules/dds/texture_loader_dds.cpp b/modules/dds/texture_loader_dds.cpp
index 2c0e604e66..eb5614338b 100644
--- a/modules/dds/texture_loader_dds.cpp
+++ b/modules/dds/texture_loader_dds.cpp
@@ -409,9 +409,7 @@ Ref<Resource> ResourceFormatDDS::load(const String &p_path, const String &p_orig
}
Ref<Image> img = memnew(Image(width, height, mipmaps - 1, info.format, src_data));
-
- Ref<ImageTexture> texture = memnew(ImageTexture);
- texture->create_from_image(img);
+ Ref<ImageTexture> texture = ImageTexture::create_from_image(img);
if (r_error) {
*r_error = OK;