-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
17,507 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
project(spine-glfw) | ||
if(MSVC) | ||
message("MSCV detected") | ||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS") | ||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") | ||
else() | ||
message("${CMAKE_C_FLAGS}") | ||
message("${CMAKE_CXX_FLAGS}") | ||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic -Wno-unused-parameter -std=c99") | ||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wnon-virtual-dtor -pedantic -Wno-unused-parameter -std=c++11 -fno-exceptions -fno-rtti") | ||
endif() | ||
|
||
include(FetchContent) | ||
|
||
# Fetch GLFW | ||
FetchContent_Declare( | ||
glfw | ||
GIT_REPOSITORY https://github.com/glfw/glfw.git | ||
GIT_TAG latest | ||
) | ||
FetchContent_MakeAvailable(glfw) | ||
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL " " FORCE) | ||
set(GLFW_BUILD_TESTS OFF CACHE BOOL " " FORCE) | ||
set(GLFW_BUILD_DOCS OFF CACHE BOOL " " FORCE) | ||
set(GLFW_INSTALL OFF CACHE BOOL " " FORCE) | ||
|
||
# Fetch glbinding | ||
FetchContent_Declare( | ||
glbinding | ||
GIT_REPOSITORY https://github.com/cginternals/glbinding.git | ||
GIT_TAG master | ||
) | ||
FetchContent_MakeAvailable(glbinding) | ||
set(OPTION_BUILD_DOCS OFF CACHE BOOL " " FORCE) | ||
set(OPTION_BUILD_EXAMPLES OFF CACHE BOOL " " FORCE) | ||
set(OPTION_BUILD_TEST OFF CACHE BOOL " " FORCE) | ||
set(OPTION_BUILD_TOOLS OFF CACHE BOOL " " FORCE) | ||
|
||
include_directories(${glbinding_SOURCE_DIR}/include) | ||
include_directories(src) | ||
|
||
# Find local OpenGL lib | ||
find_package(OpenGL REQUIRED) | ||
|
||
# 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) | ||
target_link_libraries(spine-glfw LINK_PUBLIC spine-cpp spine-cpp-lite) | ||
|
||
# Example | ||
add_executable(spine-glfw-example example/main.cpp) | ||
target_link_libraries(spine-glfw-example PRIVATE glfw) | ||
target_link_libraries(spine-glfw-example PRIVATE OpenGL::GL) | ||
target_link_libraries(spine-glfw-example LINK_PUBLIC spine-glfw) | ||
target_link_libraries(spine-glfw-example PRIVATE glbinding::glbinding) | ||
|
||
# copy data to build directory | ||
add_custom_command(TARGET spine-glfw-example PRE_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy_directory | ||
${CMAKE_CURRENT_LIST_DIR}/data $<TARGET_FILE_DIR:spine-glfw-example>/data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
spineboy-pma.png | ||
size: 1024, 256 | ||
filter: Linear, Linear | ||
pma: true | ||
scale: 0.5 | ||
crosshair | ||
bounds: 352, 7, 45, 45 | ||
eye-indifferent | ||
bounds: 862, 105, 47, 45 | ||
eye-surprised | ||
bounds: 505, 79, 47, 45 | ||
front-bracer | ||
bounds: 826, 66, 29, 40 | ||
front-fist-closed | ||
bounds: 786, 65, 38, 41 | ||
front-fist-open | ||
bounds: 710, 51, 43, 44 | ||
rotate: 90 | ||
front-foot | ||
bounds: 210, 6, 63, 35 | ||
front-shin | ||
bounds: 665, 128, 41, 92 | ||
rotate: 90 | ||
front-thigh | ||
bounds: 2, 2, 23, 56 | ||
rotate: 90 | ||
front-upper-arm | ||
bounds: 250, 205, 23, 49 | ||
goggles | ||
bounds: 665, 171, 131, 83 | ||
gun | ||
bounds: 798, 152, 105, 102 | ||
head | ||
bounds: 2, 27, 136, 149 | ||
hoverboard-board | ||
bounds: 2, 178, 246, 76 | ||
hoverboard-thruster | ||
bounds: 722, 96, 30, 32 | ||
rotate: 90 | ||
hoverglow-small | ||
bounds: 275, 81, 137, 38 | ||
mouth-grind | ||
bounds: 614, 97, 47, 30 | ||
mouth-oooo | ||
bounds: 612, 65, 47, 30 | ||
mouth-smile | ||
bounds: 661, 64, 47, 30 | ||
muzzle-glow | ||
bounds: 382, 54, 25, 25 | ||
muzzle-ring | ||
bounds: 275, 54, 25, 105 | ||
rotate: 90 | ||
muzzle01 | ||
bounds: 911, 95, 67, 40 | ||
rotate: 90 | ||
muzzle02 | ||
bounds: 792, 108, 68, 42 | ||
muzzle03 | ||
bounds: 956, 171, 83, 53 | ||
rotate: 90 | ||
muzzle04 | ||
bounds: 275, 7, 75, 45 | ||
muzzle05 | ||
bounds: 140, 3, 68, 38 | ||
neck | ||
bounds: 250, 182, 18, 21 | ||
portal-bg | ||
bounds: 140, 43, 133, 133 | ||
portal-flare1 | ||
bounds: 554, 65, 56, 30 | ||
portal-flare2 | ||
bounds: 759, 112, 57, 31 | ||
rotate: 90 | ||
portal-flare3 | ||
bounds: 554, 97, 58, 30 | ||
portal-shade | ||
bounds: 275, 121, 133, 133 | ||
portal-streaks1 | ||
bounds: 410, 126, 126, 128 | ||
portal-streaks2 | ||
bounds: 538, 129, 125, 125 | ||
rear-bracer | ||
bounds: 857, 67, 28, 36 | ||
rear-foot | ||
bounds: 663, 96, 57, 30 | ||
rear-shin | ||
bounds: 414, 86, 38, 89 | ||
rotate: 90 | ||
rear-thigh | ||
bounds: 756, 63, 28, 47 | ||
rear-upper-arm | ||
bounds: 60, 5, 20, 44 | ||
rotate: 90 | ||
torso | ||
bounds: 905, 164, 49, 90 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.