diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-02-11 16:01:55 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-11 16:01:55 +0100 |
commit | 1eb424ec9549bdd086dfb54c847d107519be73d9 (patch) | |
tree | d9a3ec0c72f3a4eda02e16ed883f560e02cf1ccf /editor/plugins/texture_editor_plugin.cpp | |
parent | 3e3f8a47616327d7faeb17f558bb81a943385e82 (diff) | |
parent | db81928e08cb58d5f67908c6dfcf9433e572ffe8 (diff) | |
download | redot-engine-1eb424ec9549bdd086dfb54c847d107519be73d9.tar.gz |
Merge pull request #36098 from godotengine/vulkan
Add initial Vulkan support, master branch goes UNSTABLE
Diffstat (limited to 'editor/plugins/texture_editor_plugin.cpp')
-rw-r--r-- | editor/plugins/texture_editor_plugin.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp index 9489836984..60f9bb5dc1 100644 --- a/editor/plugins/texture_editor_plugin.cpp +++ b/editor/plugins/texture_editor_plugin.cpp @@ -46,7 +46,7 @@ void TextureEditor::_notification(int p_what) { if (p_what == NOTIFICATION_DRAW) { - Ref<Texture> checkerboard = get_icon("Checkerboard", "EditorIcons"); + Ref<Texture2D> checkerboard = get_icon("Checkerboard", "EditorIcons"); Size2 size = get_size(); draw_texture_rect(checkerboard, Rect2(Point2(), size), true); @@ -110,7 +110,7 @@ void TextureEditor::_changed_callback(Object *p_changed, const char *p_prop) { update(); } -void TextureEditor::edit(Ref<Texture> p_texture) { +void TextureEditor::edit(Ref<Texture2D> p_texture) { if (!texture.is_null()) texture->remove_change_receptor(this); @@ -132,6 +132,7 @@ void TextureEditor::_bind_methods() { TextureEditor::TextureEditor() { + set_texture_repeat(TextureRepeat::TEXTURE_REPEAT_ENABLED); set_custom_minimum_size(Size2(1, 150)); } @@ -148,11 +149,11 @@ bool EditorInspectorPluginTexture::can_handle(Object *p_object) { void EditorInspectorPluginTexture::parse_begin(Object *p_object) { - Texture *texture = Object::cast_to<Texture>(p_object); + Texture2D *texture = Object::cast_to<Texture2D>(p_object); if (!texture) { return; } - Ref<Texture> m(texture); + Ref<Texture2D> m(texture); TextureEditor *editor = memnew(TextureEditor); editor->edit(m); |