mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
[cpp] Fixes #2635
This commit is contained in:
parent
66a9ce0f0f
commit
0e258cd0aa
@ -151,7 +151,7 @@ RenderCommand *SkeletonRenderer::render(Skeleton &skeleton) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Early out if the slot color is 0 or the bone is not active
|
// 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);
|
clipper.clipEnd(slot);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,18 +1,13 @@
|
|||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.10)
|
||||||
project(spine-glfw)
|
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)
|
include(FetchContent)
|
||||||
# Fetch GLFW
|
# Fetch GLFW
|
||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
glfw
|
glfw
|
||||||
GIT_REPOSITORY https://github.com/glfw/glfw.git
|
GIT_REPOSITORY https://github.com/glfw/glfw.git
|
||||||
GIT_TAG latest
|
GIT_TAG latest
|
||||||
|
GIT_SHALLOW 1
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(glfw)
|
FetchContent_MakeAvailable(glfw)
|
||||||
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL " " FORCE)
|
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL " " FORCE)
|
||||||
@ -24,7 +19,8 @@ set(GLFW_INSTALL OFF CACHE BOOL " " FORCE)
|
|||||||
FetchContent_Declare(
|
FetchContent_Declare(
|
||||||
glbinding
|
glbinding
|
||||||
GIT_REPOSITORY https://github.com/cginternals/glbinding.git
|
GIT_REPOSITORY https://github.com/cginternals/glbinding.git
|
||||||
GIT_TAG master
|
GIT_TAG v3.3.0
|
||||||
|
GIT_SHALLOW 1
|
||||||
)
|
)
|
||||||
FetchContent_MakeAvailable(glbinding)
|
FetchContent_MakeAvailable(glbinding)
|
||||||
set(OPTION_BUILD_DOCS OFF CACHE BOOL " " FORCE)
|
set(OPTION_BUILD_DOCS OFF CACHE BOOL " " FORCE)
|
||||||
@ -38,6 +34,12 @@ include_directories(src)
|
|||||||
# Find local OpenGL lib
|
# Find local OpenGL lib
|
||||||
find_package(OpenGL REQUIRED)
|
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
|
# spine-glfw library
|
||||||
add_library(spine-glfw STATIC src/spine-glfw.cpp src/spine-glfw.h src/stb_image.h)
|
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)
|
target_link_libraries(spine-glfw PRIVATE glbinding::glbinding)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user