From 0e258cd0aa66ce660f068fad22c394adf46c9265 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 18 Sep 2024 14:48:17 +0200 Subject: [PATCH] [cpp] Fixes #2635 --- .../spine-cpp/src/spine/SkeletonRenderer.cpp | 2 +- spine-glfw/CMakeLists.txt | 16 +++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/spine-cpp/spine-cpp/src/spine/SkeletonRenderer.cpp b/spine-cpp/spine-cpp/src/spine/SkeletonRenderer.cpp index 1934b19c0..26dbffa95 100644 --- a/spine-cpp/spine-cpp/src/spine/SkeletonRenderer.cpp +++ b/spine-cpp/spine-cpp/src/spine/SkeletonRenderer.cpp @@ -151,7 +151,7 @@ RenderCommand *SkeletonRenderer::render(Skeleton &skeleton) { } // Early out if the slot color is 0 or the bone is not active - if (slot.getColor().a == 0 || !slot.getBone().isActive()) { + if ((slot.getColor().a == 0 || !slot.getBone().isActive()) && !attachment->getRTTI().isExactly(ClippingAttachment::rtti)) { clipper.clipEnd(slot); continue; } diff --git a/spine-glfw/CMakeLists.txt b/spine-glfw/CMakeLists.txt index dfd3a3dd7..89c3898a4 100644 --- a/spine-glfw/CMakeLists.txt +++ b/spine-glfw/CMakeLists.txt @@ -1,18 +1,13 @@ cmake_minimum_required(VERSION 3.10) project(spine-glfw) -# Default flags -include(${CMAKE_SOURCE_DIR}/../flags.cmake) - -# Add spine-cpp -add_subdirectory(${CMAKE_SOURCE_DIR}/../spine-cpp ${CMAKE_BINARY_DIR}/spine-cpp-build) - include(FetchContent) # Fetch GLFW FetchContent_Declare( glfw GIT_REPOSITORY https://github.com/glfw/glfw.git GIT_TAG latest + GIT_SHALLOW 1 ) FetchContent_MakeAvailable(glfw) set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL " " FORCE) @@ -24,7 +19,8 @@ set(GLFW_INSTALL OFF CACHE BOOL " " FORCE) FetchContent_Declare( glbinding GIT_REPOSITORY https://github.com/cginternals/glbinding.git - GIT_TAG master + GIT_TAG v3.3.0 + GIT_SHALLOW 1 ) FetchContent_MakeAvailable(glbinding) set(OPTION_BUILD_DOCS OFF CACHE BOOL " " FORCE) @@ -38,6 +34,12 @@ include_directories(src) # Find local OpenGL lib find_package(OpenGL REQUIRED) +# Default flags +include(${CMAKE_SOURCE_DIR}/../flags.cmake) + +# Add spine-cpp +add_subdirectory(${CMAKE_SOURCE_DIR}/../spine-cpp ${CMAKE_BINARY_DIR}/spine-cpp-build) + # spine-glfw library add_library(spine-glfw STATIC src/spine-glfw.cpp src/spine-glfw.h src/stb_image.h) target_link_libraries(spine-glfw PRIVATE glbinding::glbinding)