diff options
author | JFonS <joan.fonssanchez@gmail.com> | 2020-03-10 12:54:25 +0100 |
---|---|---|
committer | JFonS <joan.fonssanchez@gmail.com> | 2020-03-10 13:08:17 +0100 |
commit | 9f2f7ee5eb59bf26e74edb3565f352f12b685963 (patch) | |
tree | 11e4cf8dceb8554f54a540eb7d8f646f721d5708 /scene | |
parent | 002d821e6e66f67966193c7297347b8d4f56c536 (diff) |
Return correct mesh format for PrimitiveMesh.
The return value was changed during the Vulkan port, but it didn't include ARRAY_FORMAT_INDEX. This meant they were wrongly considered non-indexed meshes and the click-selection logic for all primitive meshes broke.
Diffstat (limited to 'scene')
-rw-r--r-- | scene/resources/primitive_meshes.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/resources/primitive_meshes.cpp b/scene/resources/primitive_meshes.cpp index 00fc016ca1..959ee214a2 100644 --- a/scene/resources/primitive_meshes.cpp +++ b/scene/resources/primitive_meshes.cpp @@ -150,7 +150,7 @@ Array PrimitiveMesh::surface_get_blend_shape_arrays(int p_surface) const { uint32_t PrimitiveMesh::surface_get_format(int p_idx) const { ERR_FAIL_INDEX_V(p_idx, 1, 0); - return VS::ARRAY_COMPRESS_DEFAULT; + return VS::ARRAY_FORMAT_VERTEX | VS::ARRAY_FORMAT_NORMAL | VS::ARRAY_FORMAT_TANGENT | VS::ARRAY_FORMAT_TEX_UV | VS::ARRAY_FORMAT_INDEX | VS::ARRAY_COMPRESS_DEFAULT; } Mesh::PrimitiveType PrimitiveMesh::surface_get_primitive_type(int p_idx) const { |