mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-09 12:29:35 +01:00
mesh_surface_get_format_offset and mesh_surface_get_format_stride will now provide an error with an invalid array index
This commit is contained in:
parent
4d6dda4df0
commit
4c295c2cd6
@ -848,6 +848,7 @@ Error VisualServer::_surface_set_data(Array p_arrays, uint32_t p_format, uint32_
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t VisualServer::mesh_surface_get_format_offset(uint32_t p_format, int p_vertex_len, int p_index_len, int p_array_index) const {
|
uint32_t VisualServer::mesh_surface_get_format_offset(uint32_t p_format, int p_vertex_len, int p_index_len, int p_array_index) const {
|
||||||
|
ERR_FAIL_INDEX_V(p_array_index, ARRAY_MAX, 0);
|
||||||
uint32_t offsets[ARRAY_MAX];
|
uint32_t offsets[ARRAY_MAX];
|
||||||
uint32_t strides[ARRAY_MAX];
|
uint32_t strides[ARRAY_MAX];
|
||||||
mesh_surface_make_offsets_from_format(p_format, p_vertex_len, p_index_len, offsets, strides);
|
mesh_surface_make_offsets_from_format(p_format, p_vertex_len, p_index_len, offsets, strides);
|
||||||
@ -855,6 +856,7 @@ uint32_t VisualServer::mesh_surface_get_format_offset(uint32_t p_format, int p_v
|
|||||||
}
|
}
|
||||||
|
|
||||||
uint32_t VisualServer::mesh_surface_get_format_stride(uint32_t p_format, int p_vertex_len, int p_index_len, int p_array_index) const {
|
uint32_t VisualServer::mesh_surface_get_format_stride(uint32_t p_format, int p_vertex_len, int p_index_len, int p_array_index) const {
|
||||||
|
ERR_FAIL_INDEX_V(p_array_index, ARRAY_MAX, 0);
|
||||||
uint32_t offsets[ARRAY_MAX];
|
uint32_t offsets[ARRAY_MAX];
|
||||||
uint32_t strides[ARRAY_MAX];
|
uint32_t strides[ARRAY_MAX];
|
||||||
mesh_surface_make_offsets_from_format(p_format, p_vertex_len, p_index_len, offsets, strides);
|
mesh_surface_make_offsets_from_format(p_format, p_vertex_len, p_index_len, offsets, strides);
|
||||||
|
Loading…
Reference in New Issue
Block a user