• RuntimesGodot
  • RenderingServer function missing 8th argument

  • Изменено

There is a missing argument at line 149 in "spine_godot/SpineSprite.cpp", the function takes 8 arguments (no optional arguments), but only 7 was provided.

RS::get_singleton()->mesh_surface_make_offsets_from_format(surface.format, surface.vertex_count, surface.index_count, surface_offsets, vertex_stride, attribute_stride, skin_stride);

Here is the definition of the function in Godot's "servers/rendering_server.h"

virtual void mesh_surface_make_offsets_from_format(uint64_t p_format, int p_vertex_len, int p_index_len, uint32_t *r_offsets, uint32_t &r_vertex_element_size, uint32_t &r_normal_element_size, uint32_t &r_attrib_element_size, uint32_t &r_skin_element_size) const;

This causes a build error when trying to compile godot with spine as a custom module:

scons platform=windows tools=yes module_mono_enabled=yes mono_glue=yes custom_modules="..\spine_godot\"
``` 

Error: E:\codebase\spine_godot\SpineSprite.cpp(149): error C2660: 'RenderingServer::mesh_surface_make_offsets_from_format': function does not take 7 arguments

I didn't study the code to know what should be passed as the 8th argument, so I provided a random "uint32_t" and the build was successful, but I'm sure this will introduce a bug somewhere.

Related Discussions
...

What Godot version are you building against? We currently support 3.5, 4.0, and 4.1, for which the builds all work
EsotericSoftware/spine-runtimes/actions/workflows/spine-godot.yml
EsotericSoftware/spine-runtimes/actions/workflows/spine-godot-v4-all.yml

We'll support 4.2 once it's out of beta.

    Mario
    Alright, I look forward to that, however it would be more preferable if you release the module as a GDExtension.
    I built it with Godot 4.2, The examples provided in spine-godot works fine, except for "08-animation-player" where the nodes are moving but the animation is not playing in the cut-scene.