|
@@ -535,21 +535,25 @@ public:
|
|
|
|
|
|
_FORCE_INLINE_ RS::MultimeshTransformFormat multimesh_get_transform_format(RID p_multimesh) const {
|
|
|
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
|
|
|
+ ERR_FAIL_NULL_V(multimesh, RS::MULTIMESH_TRANSFORM_3D);
|
|
|
return multimesh->xform_format;
|
|
|
}
|
|
|
|
|
|
_FORCE_INLINE_ bool multimesh_uses_colors(RID p_multimesh) const {
|
|
|
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
|
|
|
+ ERR_FAIL_NULL_V(multimesh, false);
|
|
|
return multimesh->uses_colors;
|
|
|
}
|
|
|
|
|
|
_FORCE_INLINE_ bool multimesh_uses_custom_data(RID p_multimesh) const {
|
|
|
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
|
|
|
+ ERR_FAIL_NULL_V(multimesh, false);
|
|
|
return multimesh->uses_custom_data;
|
|
|
}
|
|
|
|
|
|
_FORCE_INLINE_ uint32_t multimesh_get_instances_to_draw(RID p_multimesh) const {
|
|
|
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
|
|
|
+ ERR_FAIL_NULL_V(multimesh, 0);
|
|
|
if (multimesh->visible_instances >= 0) {
|
|
|
return multimesh->visible_instances;
|
|
|
}
|
|
@@ -558,21 +562,25 @@ public:
|
|
|
|
|
|
_FORCE_INLINE_ GLuint multimesh_get_gl_buffer(RID p_multimesh) const {
|
|
|
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
|
|
|
+ ERR_FAIL_NULL_V(multimesh, 0);
|
|
|
return multimesh->buffer;
|
|
|
}
|
|
|
|
|
|
_FORCE_INLINE_ uint32_t multimesh_get_stride(RID p_multimesh) const {
|
|
|
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
|
|
|
+ ERR_FAIL_NULL_V(multimesh, 0);
|
|
|
return multimesh->stride_cache;
|
|
|
}
|
|
|
|
|
|
_FORCE_INLINE_ uint32_t multimesh_get_color_offset(RID p_multimesh) const {
|
|
|
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
|
|
|
+ ERR_FAIL_NULL_V(multimesh, 0);
|
|
|
return multimesh->color_offset_cache;
|
|
|
}
|
|
|
|
|
|
_FORCE_INLINE_ uint32_t multimesh_get_custom_data_offset(RID p_multimesh) const {
|
|
|
MultiMesh *multimesh = multimesh_owner.get_or_null(p_multimesh);
|
|
|
+ ERR_FAIL_NULL_V(multimesh, 0);
|
|
|
return multimesh->custom_data_offset_cache;
|
|
|
}
|
|
|
|