소스 검색

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.
JFonS 5 년 전
부모
커밋
9f2f7ee5eb
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      scene/resources/primitive_meshes.cpp

+ 1 - 1
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 {