Check if mesh data build is needed

This commit is contained in:
luboslenco
2025-08-31 21:26:37 +02:00
parent ce9eb4824a
commit c32366f09d
+3 -1
View File
@@ -26,7 +26,9 @@ function mesh_object_create(data: mesh_data_t, materials: material_data_t[]): me
function mesh_object_set_data(raw: mesh_object_t, data: mesh_data_t) {
raw.data = data;
mesh_data_build(data);
if (data._.vertex_buffer == null) {
mesh_data_build(data);
}
// Scale-up packed (-1,1) mesh coords
raw.base.transform.scale_world = data.scale_pos;