Skip to content

Commit

Permalink
Merge branch '4.1' into 4.2-beta
Browse files Browse the repository at this point in the history
# Conflicts:
#	spine-ts/index.html
#	spine-ts/spine-player/src/PlayerEditor.ts
  • Loading branch information
badlogic committed Dec 8, 2023
2 parents 4874c93 + 4e19078 commit 8878437
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/spine-godot-v4.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ jobs:
- name: Set up Java 11
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 17

- name: Setup python and scons
uses: ./.github/actions/setup-godot-deps
Expand Down
2 changes: 2 additions & 0 deletions spine-godot/build/build-templates-v4.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ elif [ "$platform" = "ios" ]; then
cp libgodot.ios.template_release.simulator.a ios_xcode/libgodot.ios.release.xcframework/ios-arm64_x86_64-simulator/libgodot.a
cp libgodot.ios.template_debug.arm64.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64/libgodot.a
cp libgodot.ios.template_debug.simulator.a ios_xcode/libgodot.ios.debug.xcframework/ios-arm64_x86_64-simulator/libgodot.a
cp -r ~/VulkanSDK/1.3.250.1/MoltenVK/MoltenVK.xcframework ios_xcode/
rm -rf ios_xcode/MoltenVK.xcframework/{macos,tvos}*
rm -rf ios.zip
pushd ios_xcode
zip -q -9 -r ../ios.zip *
Expand Down
4 changes: 4 additions & 0 deletions spine-godot/spine_godot/SpineSprite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,11 @@ void SpineMesh2D::update_mesh(const Vector<Point2> &vertices,
uint32_t skin_stride;
RS::get_singleton()->mesh_create_surface_data_from_arrays(&surface, (RS::PrimitiveType) Mesh::PRIMITIVE_TRIANGLES, arrays, TypedArray<Array>(), Dictionary(), Mesh::ArrayFormat::ARRAY_FLAG_USE_DYNAMIC_UPDATE);
RS::get_singleton()->mesh_add_surface(mesh, surface);
#if VERSION_MINOR > 1
RS::get_singleton()->mesh_surface_make_offsets_from_format(surface.format, surface.vertex_count, surface.index_count, surface_offsets, vertex_stride, normal_tangent_stride, attribute_stride, skin_stride);
#else
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);
#endif
num_vertices = vertices.size();
num_indices = indices.size();
vertex_buffer = surface.vertex_data;
Expand Down
3 changes: 2 additions & 1 deletion spine-godot/spine_godot/SpineSprite.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ class SpineMesh2D : public Node2D {
PackedByteArray vertex_buffer;
PackedByteArray attribute_buffer;
uint32_t vertex_stride;
uint32_t normal_tangent_stride;
uint32_t attribute_stride;
#else
RID mesh;
Expand All @@ -80,7 +81,7 @@ class SpineMesh2D : public Node2D {

public:
#if VERSION_MAJOR > 3
SpineMesh2D() : renderer_object(nullptr), indices_changed(true), num_vertices(0), num_indices(0), vertex_stride(0), attribute_stride(0){};
SpineMesh2D() : renderer_object(nullptr), indices_changed(true), num_vertices(0), num_indices(0), vertex_stride(0), normal_tangent_stride(0), attribute_stride(0){};
~SpineMesh2D() {
if (mesh.is_valid()) {
RS::get_singleton()->free(mesh);
Expand Down

0 comments on commit 8878437

Please sign in to comment.