diff options
author | reduz <reduzio@gmail.com> | 2020-12-12 09:06:59 -0300 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2020-12-13 21:29:51 -0300 |
commit | 77a045e902db9f5f0ea7961e827c337541a6436c (patch) | |
tree | 130452bd4eac202fa580269c3877a46e76cd8bda /scene/resources/mesh.h | |
parent | 06314c1b0e8100546a53cf2786fa244c5d19af6f (diff) |
Rework Mesh handling on scene importing.
-Reworked how meshes are treated by importer by using EditorSceneImporterMesh and EditorSceneImporterMeshNode. Instead of Mesh and MeshInstance, this allows more efficient processing of meshes before they are actually registered in the RenderingServer.
-Integrated MeshOptimizer
-Reworked internals of SurfaceTool to use arrays, making it more performant and easy to run optimizatons on.
Diffstat (limited to 'scene/resources/mesh.h')
-rw-r--r-- | scene/resources/mesh.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/scene/resources/mesh.h b/scene/resources/mesh.h index ae2139a0cf..586bb2f802 100644 --- a/scene/resources/mesh.h +++ b/scene/resources/mesh.h @@ -53,7 +53,10 @@ public: NO_INDEX_ARRAY = RenderingServer::NO_INDEX_ARRAY, ARRAY_WEIGHTS_SIZE = RenderingServer::ARRAY_WEIGHTS_SIZE }; - + enum BlendShapeMode { + BLEND_SHAPE_MODE_NORMALIZED = RS::BLEND_SHAPE_MODE_NORMALIZED, + BLEND_SHAPE_MODE_RELATIVE = RS::BLEND_SHAPE_MODE_RELATIVE, + }; enum ArrayType { ARRAY_VERTEX = RenderingServer::ARRAY_VERTEX, ARRAY_NORMAL = RenderingServer::ARRAY_NORMAL, @@ -171,12 +174,6 @@ class ArrayMesh : public Mesh { Array _get_surfaces() const; void _set_surfaces(const Array &p_data); -public: - enum BlendShapeMode { - BLEND_SHAPE_MODE_NORMALIZED = RS::BLEND_SHAPE_MODE_NORMALIZED, - BLEND_SHAPE_MODE_RELATIVE = RS::BLEND_SHAPE_MODE_RELATIVE, - }; - private: struct Surface { uint32_t format; @@ -268,6 +265,6 @@ VARIANT_ENUM_CAST(Mesh::ArrayType); VARIANT_ENUM_CAST(Mesh::ArrayFormat); VARIANT_ENUM_CAST(Mesh::ArrayCustomFormat); VARIANT_ENUM_CAST(Mesh::PrimitiveType); -VARIANT_ENUM_CAST(ArrayMesh::BlendShapeMode); +VARIANT_ENUM_CAST(Mesh::BlendShapeMode); #endif |