1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Reimplement skeletons and blend shapes

Uses compute shaders, which only once, on demand, and all in parallel.
This commit is contained in:
reduz
2020-12-16 11:07:08 -03:00
parent c514cc5822
commit bf77016c8a
21 changed files with 868 additions and 117 deletions

View File

@@ -231,14 +231,17 @@ public:
/* MESH API */
virtual RID mesh_create_from_surfaces(const Vector<SurfaceData> &p_surfaces) {
virtual RID mesh_create_from_surfaces(const Vector<SurfaceData> &p_surfaces, int p_blend_shape_count = 0) {
RID mesh = mesh_create();
mesh_set_blend_shape_count(mesh, p_blend_shape_count);
for (int i = 0; i < p_surfaces.size(); i++) {
mesh_add_surface(mesh, p_surfaces[i]);
}
return mesh;
}
BIND2(mesh_set_blend_shape_count, RID, int)
BIND0R(RID, mesh_create)
BIND2(mesh_add_surface, RID, const SurfaceData &)