diff options
Diffstat (limited to 'scene')
| -rw-r--r-- | scene/2d/audio_stream_player_2d.cpp | 2 | ||||
| -rw-r--r-- | scene/2d/node_2d.cpp | 6 | ||||
| -rw-r--r-- | scene/2d/node_2d.h | 2 | ||||
| -rw-r--r-- | scene/2d/tile_map.cpp | 2 | ||||
| -rw-r--r-- | scene/3d/audio_stream_player_3d.cpp | 4 | ||||
| -rw-r--r-- | scene/3d/light.cpp | 9 | ||||
| -rw-r--r-- | scene/3d/mesh_instance.cpp | 6 | ||||
| -rw-r--r-- | scene/3d/mesh_instance.h | 1 | ||||
| -rw-r--r-- | scene/3d/voxel_light_baker.cpp | 6 | ||||
| -rw-r--r-- | scene/gui/control.cpp | 2 | ||||
| -rw-r--r-- | scene/gui/gradient_edit.cpp | 4 | ||||
| -rw-r--r-- | scene/gui/graph_edit.cpp | 12 | ||||
| -rw-r--r-- | scene/gui/graph_edit.h | 2 | ||||
| -rw-r--r-- | scene/gui/line_edit.cpp | 2 | ||||
| -rw-r--r-- | scene/gui/tabs.cpp | 81 | ||||
| -rw-r--r-- | scene/gui/tabs.h | 2 | ||||
| -rw-r--r-- | scene/gui/text_edit.cpp | 4 | ||||
| -rw-r--r-- | scene/gui/tree.cpp | 2 | ||||
| -rw-r--r-- | scene/resources/convex_polygon_shape.cpp | 3 | ||||
| -rw-r--r-- | scene/resources/dynamic_font.cpp | 4 | ||||
| -rw-r--r-- | scene/resources/style_box.cpp | 28 | 
21 files changed, 95 insertions, 89 deletions
diff --git a/scene/2d/audio_stream_player_2d.cpp b/scene/2d/audio_stream_player_2d.cpp index a1ae05d971..9de72a4fcd 100644 --- a/scene/2d/audio_stream_player_2d.cpp +++ b/scene/2d/audio_stream_player_2d.cpp @@ -179,7 +179,7 @@ void AudioStreamPlayer2D::_notification(int p_what) {  			Physics2DDirectSpaceState::ShapeResult sr[MAX_INTERSECT_AREAS]; -			int areas = space_state->intersect_point(global_pos, sr, MAX_INTERSECT_AREAS, Set<RID>(), area_mask); +			int areas = space_state->intersect_point(global_pos, sr, MAX_INTERSECT_AREAS, Set<RID>(), area_mask, false, true);  			for (int i = 0; i < areas; i++) { diff --git a/scene/2d/node_2d.cpp b/scene/2d/node_2d.cpp index 29065a89b3..2f94c3c6f5 100644 --- a/scene/2d/node_2d.cpp +++ b/scene/2d/node_2d.cpp @@ -204,12 +204,6 @@ Size2 Node2D::get_scale() const {  	return _scale;  } -void Node2D::_notification(int p_what) { - -	switch (p_what) { -	} -} -  Transform2D Node2D::get_transform() const {  	return _mat; diff --git a/scene/2d/node_2d.h b/scene/2d/node_2d.h index 725686cdf8..924a84fb88 100644 --- a/scene/2d/node_2d.h +++ b/scene/2d/node_2d.h @@ -52,8 +52,6 @@ class Node2D : public CanvasItem {  	void _update_xform_values();  protected: -	void _notification(int p_what); -  	static void _bind_methods();  public: diff --git a/scene/2d/tile_map.cpp b/scene/2d/tile_map.cpp index a60ce47f5c..67e25ec508 100644 --- a/scene/2d/tile_map.cpp +++ b/scene/2d/tile_map.cpp @@ -593,7 +593,7 @@ void TileMap::update_dirty_quadrants() {  	if (quadrant_order_dirty) { -		int index = -0x80000000; //always must be drawn below children +		int index = -(int64_t)0x80000000; //always must be drawn below children  		for (Map<PosKey, Quadrant>::Element *E = quadrant_map.front(); E; E = E->next()) {  			Quadrant &q = E->get(); diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index abf022ecb3..3046cad624 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -290,7 +290,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {  			PhysicsDirectSpaceState::ShapeResult sr[MAX_INTERSECT_AREAS]; -			int areas = space_state->intersect_point(global_pos, sr, MAX_INTERSECT_AREAS, Set<RID>(), area_mask); +			int areas = space_state->intersect_point(global_pos, sr, MAX_INTERSECT_AREAS, Set<RID>(), area_mask, false, true);  			Area *area = NULL;  			for (int i = 0; i < areas; i++) { @@ -448,7 +448,7 @@ void AudioStreamPlayer3D::_notification(int p_what) {  							//float dist_att_db = -20 * Math::log(dist + 0.00001); //logarithmic attenuation, like in real life -							float center_val[3] = { 0.5, 0.25, 0.16666 }; +							float center_val[3] = { 0.5f, 0.25f, 0.16666f };  							AudioFrame center_frame(center_val[vol_index_max - 1], center_val[vol_index_max - 1]);  							if (attenuation < 1.0) { diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp index 7e1d60ab8e..11d61315ba 100644 --- a/scene/3d/light.cpp +++ b/scene/3d/light.cpp @@ -163,11 +163,6 @@ void Light::_update_visibility() {  	if (!is_inside_tree())  		return; -	// FIXME: Since the call to VS::instance_light_set_enabled was disabled below, -	// the whole logic became pointless so editor_ok triggers unused variable warnings. -	// Commenting out for now but this should be fixed/reimplemented so that editor_only -	// works as expected (GH-17989). -	/*  	bool editor_ok = true;  #ifdef TOOLS_ENABLED @@ -184,8 +179,8 @@ void Light::_update_visibility() {  	}  #endif -	//VS::get_singleton()->instance_light_set_enabled(get_instance(),is_visible_in_tree() && editor_ok); -	*/ +	VS::get_singleton()->instance_set_visible(get_instance(), is_visible_in_tree() && editor_ok); +  	_change_notify("geometry/visible");  } diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp index 4cbf6f2de3..cf0317cd58 100644 --- a/scene/3d/mesh_instance.cpp +++ b/scene/3d/mesh_instance.cpp @@ -253,6 +253,11 @@ void MeshInstance::_notification(int p_what) {  	}  } +int MeshInstance::get_surface_material_count() const { + +	return materials.size(); +} +  void MeshInstance::set_surface_material(int p_surface, const Ref<Material> &p_material) {  	ERR_FAIL_INDEX(p_surface, materials.size()); @@ -359,6 +364,7 @@ void MeshInstance::_bind_methods() {  	ClassDB::bind_method(D_METHOD("set_skeleton_path", "skeleton_path"), &MeshInstance::set_skeleton_path);  	ClassDB::bind_method(D_METHOD("get_skeleton_path"), &MeshInstance::get_skeleton_path); +	ClassDB::bind_method(D_METHOD("get_surface_material_count"), &MeshInstance::get_surface_material_count);  	ClassDB::bind_method(D_METHOD("set_surface_material", "surface", "material"), &MeshInstance::set_surface_material);  	ClassDB::bind_method(D_METHOD("get_surface_material", "surface"), &MeshInstance::get_surface_material); diff --git a/scene/3d/mesh_instance.h b/scene/3d/mesh_instance.h index 0dfec538f9..0b5b4b9e7b 100644 --- a/scene/3d/mesh_instance.h +++ b/scene/3d/mesh_instance.h @@ -76,6 +76,7 @@ public:  	void set_skeleton_path(const NodePath &p_skeleton);  	NodePath get_skeleton_path(); +	int get_surface_material_count() const;  	void set_surface_material(int p_surface, const Ref<Material> &p_material);  	Ref<Material> get_surface_material(int p_surface) const; diff --git a/scene/3d/voxel_light_baker.cpp b/scene/3d/voxel_light_baker.cpp index f9bd905181..541f6047d9 100644 --- a/scene/3d/voxel_light_baker.cpp +++ b/scene/3d/voxel_light_baker.cpp @@ -1619,7 +1619,7 @@ Vector3 VoxelLightBaker::_compute_pixel_light_at_pos(const Vector3 &p_pos, const  				Vector3(-0.700629, -0.509037, 0.5),  				Vector3(0.267617, -0.823639, 0.5)  			}; -			static const float weights[6] = { 0.25, 0.15, 0.15, 0.15, 0.15, 0.15 }; +			static const float weights[6] = { 0.25f, 0.15f, 0.15f, 0.15f, 0.15f, 0.15f };  			//  			cone_dirs = dirs;  			cone_dir_count = 6; @@ -1641,7 +1641,7 @@ Vector3 VoxelLightBaker::_compute_pixel_light_at_pos(const Vector3 &p_pos, const  				Vector3(0.19124006749743122, 0.39355745585016605, 0.8991883926788214),  				Vector3(0.19124006749743122, -0.39355745585016605, 0.8991883926788214),  			}; -			static const float weights[10] = { 0.08571, 0.08571, 0.08571, 0.08571, 0.08571, 0.08571, 0.08571, 0.133333, 0.133333, 0.13333 }; +			static const float weights[10] = { 0.08571f, 0.08571f, 0.08571f, 0.08571f, 0.08571f, 0.08571f, 0.08571f, 0.133333f, 0.133333f, 0.13333f };  			cone_dirs = dirs;  			cone_dir_count = 10;  			cone_aperture = 0.404; // tan(angle) 45 degrees @@ -1875,7 +1875,7 @@ Error VoxelLightBaker::make_lightmap(const Transform &p_xform, Ref<Mesh> &p_mesh  		if (bake_mode == BAKE_MODE_RAY_TRACE) {  			//blur  			//gauss kernel, 7 step sigma 2 -			static const float gauss_kernel[4] = { 0.214607, 0.189879, 0.131514, 0.071303 }; +			static const float gauss_kernel[4] = { 0.214607f, 0.189879f, 0.131514f, 0.071303f };  			//horizontal pass  			for (int i = 0; i < height; i++) {  				for (int j = 0; j < width; j++) { diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp index effcd0abee..e155d0ef86 100644 --- a/scene/gui/control.cpp +++ b/scene/gui/control.cpp @@ -769,7 +769,7 @@ void Control::force_drag(const Variant &p_data, Control *p_control) {  void Control::set_drag_preview(Control *p_control) {  	ERR_FAIL_COND(!is_inside_tree()); -	ERR_FAIL_COND(get_viewport()->gui_is_dragging()); +	ERR_FAIL_COND(!get_viewport()->gui_is_dragging());  	get_viewport()->_gui_set_drag_preview(this, p_control);  } diff --git a/scene/gui/gradient_edit.cpp b/scene/gui/gradient_edit.cpp index 934b84ec0c..c13964d196 100644 --- a/scene/gui/gradient_edit.cpp +++ b/scene/gui/gradient_edit.cpp @@ -236,8 +236,8 @@ void GradientEdit::_gui_input(const Ref<InputEvent> &p_event) {  		//Snap to nearest point if holding shift  		if (mm->get_shift()) { -			float snap_treshhold = 0.03; -			float smallest_ofs = snap_treshhold; +			float snap_threshold = 0.03; +			float smallest_ofs = snap_threshold;  			bool found = false;  			int nearest_point = 0;  			for (int i = 0; i < points.size(); ++i) { diff --git a/scene/gui/graph_edit.cpp b/scene/gui/graph_edit.cpp index b4fd7484e9..b3bebc88ec 100644 --- a/scene/gui/graph_edit.cpp +++ b/scene/gui/graph_edit.cpp @@ -406,7 +406,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {  									connecting_color = Object::cast_to<GraphNode>(to)->get_connection_input_color(E->get().to_port);  									connecting_target = false;  									connecting_to = pos; -									just_disconected = true; +									just_disconnected = true;  									emit_signal("disconnection_request", E->get().from, E->get().from_port, E->get().to, E->get().to_port);  									to = get_node(String(connecting_from)); //maybe it was erased @@ -427,7 +427,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {  					connecting_color = gn->get_connection_output_color(j);  					connecting_target = false;  					connecting_to = pos; -					just_disconected = false; +					just_disconnected = false;  					return;  				}  			} @@ -453,7 +453,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {  									connecting_color = Object::cast_to<GraphNode>(fr)->get_connection_output_color(E->get().from_port);  									connecting_target = false;  									connecting_to = pos; -									just_disconected = true; +									just_disconnected = true;  									emit_signal("disconnection_request", E->get().from, E->get().from_port, E->get().to, E->get().to_port);  									fr = get_node(String(connecting_from)); //maybe it was erased @@ -474,7 +474,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {  					connecting_color = gn->get_connection_input_color(j);  					connecting_target = false;  					connecting_to = pos; -					just_disconected = true; +					just_disconnected = true;  					return;  				} @@ -544,7 +544,7 @@ void GraphEdit::_top_layer_input(const Ref<InputEvent> &p_ev) {  			}  			emit_signal("connection_request", from, from_slot, to, to_slot); -		} else if (!just_disconected) { +		} else if (!just_disconnected) {  			String from = connecting_from;  			int from_slot = connecting_index;  			Vector2 ofs = Vector2(mb->get_position().x, mb->get_position().y); @@ -1368,6 +1368,6 @@ GraphEdit::GraphEdit() {  	zoom_hb->add_child(snap_amount);  	setting_scroll_ofs = false; -	just_disconected = false; +	just_disconnected = false;  	set_clip_contents(true);  } diff --git a/scene/gui/graph_edit.h b/scene/gui/graph_edit.h index 31a449eb59..71165e3dc9 100644 --- a/scene/gui/graph_edit.h +++ b/scene/gui/graph_edit.h @@ -94,7 +94,7 @@ private:  	Vector2 connecting_to;  	String connecting_target_to;  	int connecting_target_index; -	bool just_disconected; +	bool just_disconnected;  	bool dragging;  	bool just_selected; diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 6f344f1028..c4373876b1 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1608,6 +1608,8 @@ LineEdit::LineEdit() {  	text_changed_dirty = false;  	placeholder_alpha = 0.6;  	clear_button_enabled = false; +	clear_button_status.press_attempt = false; +	clear_button_status.pressing_inside = false;  	deselect();  	set_focus_mode(FOCUS_ALL); diff --git a/scene/gui/tabs.cpp b/scene/gui/tabs.cpp index c56b7d0f26..b7f8c74046 100644 --- a/scene/gui/tabs.cpp +++ b/scene/gui/tabs.cpp @@ -106,41 +106,8 @@ void Tabs::_gui_input(const Ref<InputEvent> &p_event) {  			}  		} -		// test hovering to display right or close button -		int hover_now = -1; -		int hover_buttons = -1; -		for (int i = 0; i < tabs.size(); i++) { - -			if (i < offset) -				continue; - -			Rect2 rect = get_tab_rect(i); -			if (rect.has_point(pos)) { -				hover_now = i; -			} -			if (tabs[i].rb_rect.has_point(pos)) { -				rb_hover = i; -				cb_hover = -1; -				hover_buttons = i; -				break; -			} else if (!tabs[i].disabled && tabs[i].cb_rect.has_point(pos)) { -				cb_hover = i; -				rb_hover = -1; -				hover_buttons = i; -				break; -			} -		} -		if (hover != hover_now) { -			hover = hover_now; -			emit_signal("tab_hover", hover); -		} - -		if (hover_buttons == -1) { // no hover -			rb_hover = hover_buttons; -			cb_hover = hover_buttons; -		} +		_update_hover();  		update(); -  		return;  	} @@ -522,6 +489,48 @@ Ref<Texture> Tabs::get_tab_right_button(int p_tab) const {  	return tabs[p_tab].right_button;  } +void Tabs::_update_hover() { + +	if (!is_inside_tree()) { +		return; +	} + +	const Point2 &pos = get_local_mouse_position(); +	// test hovering to display right or close button +	int hover_now = -1; +	int hover_buttons = -1; +	for (int i = 0; i < tabs.size(); i++) { + +		if (i < offset) +			continue; + +		Rect2 rect = get_tab_rect(i); +		if (rect.has_point(pos)) { +			hover_now = i; +		} +		if (tabs[i].rb_rect.has_point(pos)) { +			rb_hover = i; +			cb_hover = -1; +			hover_buttons = i; +			break; +		} else if (!tabs[i].disabled && tabs[i].cb_rect.has_point(pos)) { +			cb_hover = i; +			rb_hover = -1; +			hover_buttons = i; +			break; +		} +	} +	if (hover != hover_now) { +		hover = hover_now; +		emit_signal("tab_hover", hover); +	} + +	if (hover_buttons == -1) { // no hover +		rb_hover = hover_buttons; +		cb_hover = hover_buttons; +	} +} +  void Tabs::_update_cache() {  	Ref<StyleBox> tab_disabled = get_stylebox("tab_disabled");  	Ref<StyleBox> tab_bg = get_stylebox("tab_bg"); @@ -597,6 +606,7 @@ void Tabs::add_tab(const String &p_str, const Ref<Texture> &p_icon) {  	tabs.push_back(t);  	_update_cache(); +	call_deferred("_update_hover");  	update();  	minimum_size_changed();  } @@ -604,6 +614,7 @@ void Tabs::add_tab(const String &p_str, const Ref<Texture> &p_icon) {  void Tabs::clear_tabs() {  	tabs.clear();  	current = 0; +	call_deferred("_update_hover");  	update();  } @@ -614,6 +625,7 @@ void Tabs::remove_tab(int p_idx) {  	if (current >= p_idx)  		current--;  	_update_cache(); +	call_deferred("_update_hover");  	update();  	minimum_size_changed(); @@ -931,6 +943,7 @@ bool Tabs::get_select_with_rmb() const {  void Tabs::_bind_methods() {  	ClassDB::bind_method(D_METHOD("_gui_input"), &Tabs::_gui_input); +	ClassDB::bind_method(D_METHOD("_update_hover"), &Tabs::_update_hover);  	ClassDB::bind_method(D_METHOD("get_tab_count"), &Tabs::get_tab_count);  	ClassDB::bind_method(D_METHOD("set_current_tab", "tab_idx"), &Tabs::set_current_tab);  	ClassDB::bind_method(D_METHOD("get_current_tab"), &Tabs::get_current_tab); diff --git a/scene/gui/tabs.h b/scene/gui/tabs.h index e204f4364b..a98744b804 100644 --- a/scene/gui/tabs.h +++ b/scene/gui/tabs.h @@ -97,6 +97,8 @@ private:  	int get_tab_width(int p_idx) const;  	void _ensure_no_over_offset(); + +	void _update_hover();  	void _update_cache();  protected: diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 32580a5ae6..f8a5c4cea3 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -2331,9 +2331,9 @@ void TextEdit::_gui_input(const Ref<InputEvent> &p_gui_input) {  				// no need to indent if we are going upwards.  				if (auto_indent && !(k->get_command() && k->get_shift())) { -					// indent once again if previous line will end with ':' or '{' +					// indent once again if previous line will end with ':' or '{' and the line is not a comment  					// (i.e. colon/brace precedes current cursor position) -					if (cursor.column > 0 && (text[cursor.line][cursor.column - 1] == ':' || text[cursor.line][cursor.column - 1] == '{')) { +					if (cursor.column > 0 && (text[cursor.line][cursor.column - 1] == ':' || text[cursor.line][cursor.column - 1] == '{') && !is_line_comment(cursor.line)) {  						if (indent_using_spaces) {  							ins += space_indent;  						} else { diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp index effa44968d..0c11181f98 100644 --- a/scene/gui/tree.cpp +++ b/scene/gui/tree.cpp @@ -2934,7 +2934,7 @@ void Tree::_notification(int p_what) {  		if (show_column_titles) { -			//title butons +			//title buttons  			int ofs = cache.bg->get_margin(MARGIN_LEFT);  			for (int i = 0; i < columns.size(); i++) { diff --git a/scene/resources/convex_polygon_shape.cpp b/scene/resources/convex_polygon_shape.cpp index 9d47bca5ed..39488760cd 100644 --- a/scene/resources/convex_polygon_shape.cpp +++ b/scene/resources/convex_polygon_shape.cpp @@ -38,10 +38,9 @@ Vector<Vector3> ConvexPolygonShape::_gen_debug_mesh_lines() {  	if (points.size() > 3) { -		QuickHull qh;  		Vector<Vector3> varr = Variant(points);  		Geometry::MeshData md; -		Error err = qh.build(varr, md); +		Error err = QuickHull::build(varr, md);  		if (err == OK) {  			Vector<Vector3> lines;  			lines.resize(md.edges.size() * 2); diff --git a/scene/resources/dynamic_font.cpp b/scene/resources/dynamic_font.cpp index 6790c35c4b..458cbf6718 100644 --- a/scene/resources/dynamic_font.cpp +++ b/scene/resources/dynamic_font.cpp @@ -201,10 +201,10 @@ Error DynamicFontAtSize::_load() {  	if (FT_HAS_COLOR(face)) {  		int best_match = 0; -		int diff = ABS(id.size - face->available_sizes[0].width); +		int diff = ABS(id.size - ((int64_t)face->available_sizes[0].width));  		scale_color_font = float(id.size) / face->available_sizes[0].width;  		for (int i = 1; i < face->num_fixed_sizes; i++) { -			int ndiff = ABS(id.size - face->available_sizes[i].width); +			int ndiff = ABS(id.size - ((int64_t)face->available_sizes[i].width));  			if (ndiff < diff) {  				best_match = i;  				diff = ndiff; diff --git a/scene/resources/style_box.cpp b/scene/resources/style_box.cpp index 69d85eeef3..05050a5ea2 100644 --- a/scene/resources/style_box.cpp +++ b/scene/resources/style_box.cpp @@ -565,8 +565,6 @@ inline void draw_ring(Vector<Vector2> &verts, Vector<int> &indices, Vector<Color  		vert_offset = 0;  	}  	int adapted_corner_detail = (corner_radius[0] == 0 && corner_radius[1] == 0 && corner_radius[2] == 0 && corner_radius[3] == 0) ? 1 : corner_detail; -	int rings = (border_width[0] == 0 && border_width[1] == 0 && border_width[2] == 0 && border_width[3] == 0) ? 1 : 2; -	rings = 2;  	int ring_corner_radius[4];  	set_inner_corner_radius(style_rect, ring_rect, corner_radius, ring_corner_radius); @@ -592,7 +590,7 @@ inline void draw_ring(Vector<Vector2> &verts, Vector<int> &indices, Vector<Color  	//calculate the vert array  	for (int corner_index = 0; corner_index < 4; corner_index++) {  		for (int detail = 0; detail <= adapted_corner_detail; detail++) { -			for (int inner_outer = (2 - rings); inner_outer < 2; inner_outer++) { +			for (int inner_outer = 0; inner_outer < 2; inner_outer++) {  				float radius;  				Color color;  				Point2 corner_point; @@ -613,19 +611,17 @@ inline void draw_ring(Vector<Vector2> &verts, Vector<int> &indices, Vector<Color  		}  	} -	if (rings == 2) { -		int vert_count = (adapted_corner_detail + 1) * 4 * rings; -		//fill the indices and the colors for the border -		for (int i = 0; i < vert_count; i++) { -			//poly 1 -			indices.push_back(vert_offset + ((i + 0) % vert_count)); -			indices.push_back(vert_offset + ((i + 2) % vert_count)); -			indices.push_back(vert_offset + ((i + 1) % vert_count)); -			//poly 2 -			indices.push_back(vert_offset + ((i + 1) % vert_count)); -			indices.push_back(vert_offset + ((i + 2) % vert_count)); -			indices.push_back(vert_offset + ((i + 3) % vert_count)); -		} +	int vert_count = (adapted_corner_detail + 1) * 4 * 2; +	//fill the indices and the colors for the border +	for (int i = 0; i < vert_count; i++) { +		//poly 1 +		indices.push_back(vert_offset + ((i + 0) % vert_count)); +		indices.push_back(vert_offset + ((i + 2) % vert_count)); +		indices.push_back(vert_offset + ((i + 1) % vert_count)); +		//poly 2 +		indices.push_back(vert_offset + ((i + 1) % vert_count)); +		indices.push_back(vert_offset + ((i + 2) % vert_count)); +		indices.push_back(vert_offset + ((i + 3) % vert_count));  	}  }  |