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:
Juan Linietsky 2019-06-11 15:43:37 -03:00
parent 9ffe57a10e
commit 3f335ce3d4
287 changed files with 2829 additions and 2540 deletions

View file

@ -864,7 +864,7 @@ void SpatialEditorViewport::_list_select(Ref<InputEventMouseButton> b) {
Spatial *spat = selection_results[i].item;
Ref<Texture> icon = EditorNode::get_singleton()->get_object_icon(spat, "Node");
Ref<Texture2D> icon = EditorNode::get_singleton()->get_object_icon(spat, "Node");
String node_path = "/" + root_name + "/" + root_path.rel_path_to(spat->get_path());
@ -2371,7 +2371,7 @@ void SpatialEditorViewport::_notification(int p_what) {
}
}
static void draw_indicator_bar(Control &surface, real_t fill, Ref<Texture> icon) {
static void draw_indicator_bar(Control &surface, real_t fill, Ref<Texture2D> icon) {
// Adjust bar size from control height
Vector2 surface_size = surface.get_size();
@ -3841,12 +3841,12 @@ void SpatialEditorViewportContainer::_notification(int p_what) {
if (p_what == NOTIFICATION_DRAW && mouseover) {
Ref<Texture> h_grabber = get_icon("grabber", "HSplitContainer");
Ref<Texture> v_grabber = get_icon("grabber", "VSplitContainer");
Ref<Texture2D> h_grabber = get_icon("grabber", "HSplitContainer");
Ref<Texture2D> v_grabber = get_icon("grabber", "VSplitContainer");
Ref<Texture> hdiag_grabber = get_icon("GuiViewportHdiagsplitter", "EditorIcons");
Ref<Texture> vdiag_grabber = get_icon("GuiViewportVdiagsplitter", "EditorIcons");
Ref<Texture> vh_grabber = get_icon("GuiViewportVhsplitter", "EditorIcons");
Ref<Texture2D> hdiag_grabber = get_icon("GuiViewportHdiagsplitter", "EditorIcons");
Ref<Texture2D> vdiag_grabber = get_icon("GuiViewportVdiagsplitter", "EditorIcons");
Ref<Texture2D> vh_grabber = get_icon("GuiViewportVhsplitter", "EditorIcons");
Vector2 size = get_size();
@ -6181,7 +6181,7 @@ void EditorSpatialGizmoPlugin::create_material(const String &p_name, const Color
materials[p_name] = mats;
}
void EditorSpatialGizmoPlugin::create_icon_material(const String &p_name, const Ref<Texture> &p_texture, bool p_on_top, const Color &p_albedo) {
void EditorSpatialGizmoPlugin::create_icon_material(const String &p_name, const Ref<Texture2D> &p_texture, bool p_on_top, const Color &p_albedo) {
Color instanced_color = EDITOR_DEF("editors/3d_gizmos/gizmo_colors/instanced", Color(0.7, 0.7, 0.7, 0.6));
@ -6227,7 +6227,7 @@ void EditorSpatialGizmoPlugin::create_handle_material(const String &p_name, bool
handle_material->set_flag(SpatialMaterial::FLAG_UNSHADED, true);
handle_material->set_flag(SpatialMaterial::FLAG_USE_POINT_SIZE, true);
Ref<Texture> handle_t = SpatialEditor::get_singleton()->get_icon("Editor3DHandle", "EditorIcons");
Ref<Texture2D> handle_t = SpatialEditor::get_singleton()->get_icon("Editor3DHandle", "EditorIcons");
handle_material->set_point_size(handle_t->get_width());
handle_material->set_texture(SpatialMaterial::TEXTURE_ALBEDO, handle_t);
handle_material->set_albedo(Color(1, 1, 1));