[godot] FIx 4.0 compilation errors.

This commit is contained in:
Mario Zechner 2023-02-16 13:51:00 +01:00
parent b64942b257
commit b80b57b380
2 changed files with 4 additions and 4 deletions

View File

@ -708,7 +708,7 @@ void SpineSprite::update_meshes(Ref<SpineSkeleton> skeleton_ref) {
}
mesh_instance->renderer_object = renderer_object;
#if VERSION > 3
#if VERSION_MAJOR > 3
mesh_instance->indices_id = (uint64_t) indices;
#endif
spine::BlendMode blend_mode = slot->getData().getBlendMode();
@ -768,7 +768,7 @@ void SpineSprite::draw() {
if (!animation_state.is_valid() && !skeleton.is_valid()) return;
if (!Engine::get_singleton()->is_editor_hint() && !get_tree()->is_debugging_collisions_hint()) return;
#if VERSION > 3
#if VERSION_MAJOR > 3
RS::get_singleton()->canvas_item_clear(this->get_canvas_item());
#else
VisualServer::get_singleton()->canvas_item_clear(this->get_canvas_item());

View File

@ -56,7 +56,7 @@ protected:
Vector<int> indices;
SpineRendererObject *renderer_object;
#if VERSION > 3
#if VERSION_MAJOR > 3
uint64_t last_indices_id;
uint64_t indices_id;
RID mesh;
@ -70,7 +70,7 @@ protected:
#endif
public:
#if VERSION > 3
#if VERSION_MAJOR > 3
SpineMesh2D() : renderer_object(nullptr), last_indices_id(0), indices_id(0), num_vertices(0), num_indices(0), vertex_stride(0), attribute_stride(0){};
~SpineMesh2D() {
if (mesh.is_valid()) {