summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/io_plugins/editor_import_collada.cpp2
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp14
-rw-r--r--tools/editor/spatial_editor_gizmos.cpp12
3 files changed, 21 insertions, 7 deletions
diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp
index e8207c9575..fa9e372eb3 100644
--- a/tools/editor/io_plugins/editor_import_collada.cpp
+++ b/tools/editor/io_plugins/editor_import_collada.cpp
@@ -1468,7 +1468,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
mr.push_back(a);
}
- p_mesh->add_surface(Mesh::PRIMITIVE_TRIANGLES,d,mr);
+ p_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES,d,mr);
if (material.is_valid()) {
p_mesh->surface_set_material(surface, material);
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index 13c69692c7..e5e8668df6 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -1823,6 +1823,19 @@ void SpatialEditorViewport::_notification(int p_what) {
surface->update();
}
+
+ int shadowmap_size = Globals::get_singleton()->get("rendering/shadow_atlas/size");
+ int atlas_q0 = Globals::get_singleton()->get("rendering/shadow_atlas/quadrant_0_subdiv");
+ int atlas_q1 = Globals::get_singleton()->get("rendering/shadow_atlas/quadrant_1_subdiv");
+ int atlas_q2 = Globals::get_singleton()->get("rendering/shadow_atlas/quadrant_2_subdiv");
+ int atlas_q3 = Globals::get_singleton()->get("rendering/shadow_atlas/quadrant_3_subdiv");
+
+ viewport->set_shadow_atlas_size(shadowmap_size);
+ viewport->set_shadow_atlas_quadrant_subdiv(0,Viewport::ShadowAtlasQuadrantSubdiv(atlas_q0));
+ viewport->set_shadow_atlas_quadrant_subdiv(1,Viewport::ShadowAtlasQuadrantSubdiv(atlas_q1));
+ viewport->set_shadow_atlas_quadrant_subdiv(2,Viewport::ShadowAtlasQuadrantSubdiv(atlas_q2));
+ viewport->set_shadow_atlas_quadrant_subdiv(3,Viewport::ShadowAtlasQuadrantSubdiv(atlas_q3));
+
}
if (p_what==NOTIFICATION_ENTER_TREE) {
@@ -2354,6 +2367,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
c->set_area_as_parent_rect();
viewport = memnew( Viewport );
viewport->set_disable_input(true);
+
c->add_child(viewport);
surface = memnew( Control );
add_child(surface);
diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp
index b1accac762..cdd56bbac5 100644
--- a/tools/editor/spatial_editor_gizmos.cpp
+++ b/tools/editor/spatial_editor_gizmos.cpp
@@ -133,7 +133,7 @@ void EditorSpatialGizmo::add_lines(const Vector<Vector3> &p_lines, const Ref<Mat
a[Mesh::ARRAY_COLOR]=color;
- mesh->add_surface(Mesh::PRIMITIVE_LINES,a);
+ mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES,a);
mesh->surface_set_material(0,p_material);
if (p_billboard) {
@@ -182,7 +182,7 @@ void EditorSpatialGizmo::add_unscaled_billboard(const Ref<Material>& p_material,
a.resize(Mesh::ARRAY_MAX);
a[Mesh::ARRAY_VERTEX]=vs;
a[Mesh::ARRAY_TEX_UV]=uv;
- mesh->add_surface(Mesh::PRIMITIVE_TRIANGLE_FAN,a);
+ mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLE_FAN,a);
mesh->surface_set_material(0,p_material);
if (true) {
@@ -259,7 +259,7 @@ void EditorSpatialGizmo::add_handles(const Vector<Vector3> &p_handles, bool p_bi
}
a[VS::ARRAY_COLOR]=colors;
- mesh->add_surface(Mesh::PRIMITIVE_POINTS,a);
+ mesh->add_surface_from_arrays(Mesh::PRIMITIVE_POINTS,a);
mesh->surface_set_material(0,SpatialEditorGizmos::singleton->handle2_material);
if (p_billboard) {
@@ -2321,7 +2321,7 @@ void NavigationMeshSpatialGizmo::redraw() {
Array a;
a.resize(Mesh::ARRAY_MAX);
a[0]=tmeshfaces;
- m->add_surface(Mesh::PRIMITIVE_TRIANGLES,a);
+ m->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES,a);
m->surface_set_material(0,navmesh->is_enabled()?SpatialEditorGizmos::singleton->navmesh_solid_material:SpatialEditorGizmos::singleton->navmesh_solid_material_disabled);
add_mesh(m);
add_collision_segments(lines);
@@ -3090,7 +3090,7 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
d.resize(VS::ARRAY_MAX);
d[Mesh::ARRAY_VERTEX]=cursor_points;
d[Mesh::ARRAY_COLOR]=cursor_colors;
- pos3d_mesh->add_surface(Mesh::PRIMITIVE_LINES,d);
+ pos3d_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES,d);
pos3d_mesh->surface_set_material(0,mat);
}
@@ -3114,7 +3114,7 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
d.resize(VS::ARRAY_MAX);
d[Mesh::ARRAY_VERTEX] = cursor_points;
d[Mesh::ARRAY_COLOR] = cursor_colors;
- listener_line_mesh->add_surface(Mesh::PRIMITIVE_LINES, d);
+ listener_line_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, d);
listener_line_mesh->surface_set_material(0, mat);
}