You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Split Geometry singleton into Geometry2D and Geometry3D
Extra `_2d` suffixes are removed from 2D methods accoringly.
This commit is contained in:
@@ -29,6 +29,8 @@
|
||||
/*************************************************************************/
|
||||
|
||||
#include "rendering_server_canvas.h"
|
||||
|
||||
#include "core/math/geometry_2d.h"
|
||||
#include "rendering_server_globals.h"
|
||||
#include "rendering_server_raster.h"
|
||||
#include "rendering_server_viewport.h"
|
||||
@@ -774,7 +776,7 @@ void RenderingServerCanvas::canvas_item_add_polygon(RID p_item, const Vector<Poi
|
||||
ERR_FAIL_COND(color_size != 0 && color_size != 1 && color_size != pointcount);
|
||||
ERR_FAIL_COND(uv_size != 0 && (uv_size != pointcount));
|
||||
#endif
|
||||
Vector<int> indices = Geometry::triangulate_polygon(p_points);
|
||||
Vector<int> indices = Geometry2D::triangulate_polygon(p_points);
|
||||
ERR_FAIL_COND_MSG(indices.empty(), "Invalid polygon data, triangulation failed.");
|
||||
|
||||
Item::CommandPolygon *polygon = canvas_item->alloc_command<Item::CommandPolygon>();
|
||||
|
||||
Reference in New Issue
Block a user