diff options
author | RedworkDE <10944644+RedworkDE@users.noreply.github.com> | 2023-01-17 12:48:10 +0100 |
---|---|---|
committer | RedworkDE <10944644+RedworkDE@users.noreply.github.com> | 2023-01-19 10:30:25 +0100 |
commit | be4eb3bbdd4d433acbf16612465d93573f35813a (patch) | |
tree | 61166a3ee052d442e825b323124751c06aebce8b /servers/rendering_server.cpp | |
parent | 9ebb3e3107bee82da2b4eafad685978c26bc1a2c (diff) | |
download | redot-engine-be4eb3bbdd4d433acbf16612465d93573f35813a.tar.gz |
Fix LOD sort order; checks in add_surface; and document all parameters of `ArrayMesh::add_surface_from_arrays`
Also clarify some related documentation and expose the misssing `ArrayFormat::ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY`
Diffstat (limited to 'servers/rendering_server.cpp')
-rw-r--r-- | servers/rendering_server.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/servers/rendering_server.cpp b/servers/rendering_server.cpp index e24b2af976..c3bd3d277f 100644 --- a/servers/rendering_server.cpp +++ b/servers/rendering_server.cpp @@ -996,6 +996,7 @@ Error RenderingServer::mesh_create_surface_data_from_arrays(SurfaceData *r_surfa if (index_array_len) { List<Variant> keys; p_lods.get_key_list(&keys); + keys.sort(); // otherwise lod levels may get skipped for (const Variant &E : keys) { float distance = E; ERR_CONTINUE(distance <= 0.0); @@ -1826,6 +1827,7 @@ void RenderingServer::_bind_methods() { BIND_BITFIELD_FLAG(ARRAY_FLAG_USE_2D_VERTICES); BIND_BITFIELD_FLAG(ARRAY_FLAG_USE_DYNAMIC_UPDATE); BIND_BITFIELD_FLAG(ARRAY_FLAG_USE_8_BONE_WEIGHTS); + BIND_BITFIELD_FLAG(ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY); BIND_ENUM_CONSTANT(PRIMITIVE_POINTS); BIND_ENUM_CONSTANT(PRIMITIVE_LINES); |