You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Add static methods for creating Image and ImageTexture
This commit is contained in:
@@ -133,8 +133,7 @@ Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh
|
||||
Main::iteration();
|
||||
Ref<Image> img = RS::get_singleton()->texture_2d_get(viewport_texture);
|
||||
ERR_CONTINUE(!img.is_valid() || img->is_empty());
|
||||
Ref<ImageTexture> it(memnew(ImageTexture));
|
||||
it->create_from_image(img);
|
||||
Ref<ImageTexture> it = ImageTexture::create_from_image(img);
|
||||
|
||||
RS::get_singleton()->free(inst);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user