You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Texture refactor
-Texture renamed to Texture2D -TextureLayered as base now inherits 2Darray, cubemap and cubemap array -Removed all references to flags in textures (they will go in the shader) -Texture3D gone for now (will come back later done properly) -Create base rasterizer for RenderDevice, RasterizerRD
This commit is contained in:
@@ -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);
|
||||
@@ -148,11 +148,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);
|
||||
|
||||
Reference in New Issue
Block a user