|
@@ -907,7 +907,7 @@ Error RenderingServer::_surface_set_data(Array p_arrays, uint64_t p_format, uint
|
|
|
|
|
|
uint32_t RenderingServer::mesh_surface_get_format_offset(BitField<ArrayFormat> p_format, int p_vertex_len, int p_array_index) const {
|
|
uint32_t RenderingServer::mesh_surface_get_format_offset(BitField<ArrayFormat> p_format, int p_vertex_len, int p_array_index) const {
|
|
ERR_FAIL_INDEX_V(p_array_index, ARRAY_MAX, 0);
|
|
ERR_FAIL_INDEX_V(p_array_index, ARRAY_MAX, 0);
|
|
- p_format = int64_t(p_format) & ~ARRAY_FORMAT_INDEX;
|
|
|
|
|
|
+ p_format = uint64_t(p_format) & ~ARRAY_FORMAT_INDEX;
|
|
uint32_t offsets[ARRAY_MAX];
|
|
uint32_t offsets[ARRAY_MAX];
|
|
uint32_t vstr;
|
|
uint32_t vstr;
|
|
uint32_t ntstr;
|
|
uint32_t ntstr;
|
|
@@ -918,7 +918,7 @@ uint32_t RenderingServer::mesh_surface_get_format_offset(BitField<ArrayFormat> p
|
|
}
|
|
}
|
|
|
|
|
|
uint32_t RenderingServer::mesh_surface_get_format_vertex_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const {
|
|
uint32_t RenderingServer::mesh_surface_get_format_vertex_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const {
|
|
- p_format = int64_t(p_format) & ~ARRAY_FORMAT_INDEX;
|
|
|
|
|
|
+ p_format = uint64_t(p_format) & ~ARRAY_FORMAT_INDEX;
|
|
uint32_t offsets[ARRAY_MAX];
|
|
uint32_t offsets[ARRAY_MAX];
|
|
uint32_t vstr;
|
|
uint32_t vstr;
|
|
uint32_t ntstr;
|
|
uint32_t ntstr;
|
|
@@ -929,18 +929,18 @@ uint32_t RenderingServer::mesh_surface_get_format_vertex_stride(BitField<ArrayFo
|
|
}
|
|
}
|
|
|
|
|
|
uint32_t RenderingServer::mesh_surface_get_format_normal_tangent_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const {
|
|
uint32_t RenderingServer::mesh_surface_get_format_normal_tangent_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const {
|
|
- p_format = int64_t(p_format) & ~ARRAY_FORMAT_INDEX;
|
|
|
|
|
|
+ p_format = uint64_t(p_format) & ~ARRAY_FORMAT_INDEX;
|
|
uint32_t offsets[ARRAY_MAX];
|
|
uint32_t offsets[ARRAY_MAX];
|
|
uint32_t vstr;
|
|
uint32_t vstr;
|
|
uint32_t ntstr;
|
|
uint32_t ntstr;
|
|
uint32_t astr;
|
|
uint32_t astr;
|
|
uint32_t sstr;
|
|
uint32_t sstr;
|
|
mesh_surface_make_offsets_from_format(p_format, p_vertex_len, 0, offsets, vstr, ntstr, astr, sstr);
|
|
mesh_surface_make_offsets_from_format(p_format, p_vertex_len, 0, offsets, vstr, ntstr, astr, sstr);
|
|
- return vstr;
|
|
|
|
|
|
+ return ntstr;
|
|
}
|
|
}
|
|
|
|
|
|
uint32_t RenderingServer::mesh_surface_get_format_attribute_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const {
|
|
uint32_t RenderingServer::mesh_surface_get_format_attribute_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const {
|
|
- p_format = int64_t(p_format) & ~ARRAY_FORMAT_INDEX;
|
|
|
|
|
|
+ p_format = uint64_t(p_format) & ~ARRAY_FORMAT_INDEX;
|
|
uint32_t offsets[ARRAY_MAX];
|
|
uint32_t offsets[ARRAY_MAX];
|
|
uint32_t vstr;
|
|
uint32_t vstr;
|
|
uint32_t ntstr;
|
|
uint32_t ntstr;
|
|
@@ -950,7 +950,7 @@ uint32_t RenderingServer::mesh_surface_get_format_attribute_stride(BitField<Arra
|
|
return astr;
|
|
return astr;
|
|
}
|
|
}
|
|
uint32_t RenderingServer::mesh_surface_get_format_skin_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const {
|
|
uint32_t RenderingServer::mesh_surface_get_format_skin_stride(BitField<ArrayFormat> p_format, int p_vertex_len) const {
|
|
- p_format = int64_t(p_format) & ~ARRAY_FORMAT_INDEX;
|
|
|
|
|
|
+ p_format = uint64_t(p_format) & ~ARRAY_FORMAT_INDEX;
|
|
uint32_t offsets[ARRAY_MAX];
|
|
uint32_t offsets[ARRAY_MAX];
|
|
uint32_t vstr;
|
|
uint32_t vstr;
|
|
uint32_t ntstr;
|
|
uint32_t ntstr;
|
|
@@ -1662,7 +1662,7 @@ TypedArray<Array> RenderingServer::mesh_surface_get_blend_shape_arrays(RID p_mes
|
|
uint32_t normal_elem_size;
|
|
uint32_t normal_elem_size;
|
|
uint32_t attrib_elem_size;
|
|
uint32_t attrib_elem_size;
|
|
uint32_t skin_elem_size;
|
|
uint32_t skin_elem_size;
|
|
- //CLAY
|
|
|
|
|
|
+
|
|
mesh_surface_make_offsets_from_format(bs_format, sd.vertex_count, 0, bs_offsets, vertex_elem_size, normal_elem_size, attrib_elem_size, skin_elem_size);
|
|
mesh_surface_make_offsets_from_format(bs_format, sd.vertex_count, 0, bs_offsets, vertex_elem_size, normal_elem_size, attrib_elem_size, skin_elem_size);
|
|
|
|
|
|
int divisor = (vertex_elem_size + normal_elem_size) * sd.vertex_count;
|
|
int divisor = (vertex_elem_size + normal_elem_size) * sd.vertex_count;
|