You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Add static methods for creating Image and ImageTexture
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user