From 8118d7ff5574cf48bebdfd727a415c49c36c6053 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Wed, 27 Aug 2025 13:00:45 +0200 Subject: [PATCH] [glfw] renderer_draw_lite -> renderer_draw_c --- spine-cpp/README.md | 2 +- spine-glfw/README.md | 25 ++++--------------------- spine-glfw/example/main-c.cpp | 2 +- spine-glfw/src/spine-glfw.cpp | 2 +- spine-glfw/src/spine-glfw.h | 2 +- spine-sdl/README.md | 14 ++++---------- 6 files changed, 12 insertions(+), 35 deletions(-) diff --git a/spine-cpp/README.md b/spine-cpp/README.md index cab32f449..2f2d12d04 100644 --- a/spine-cpp/README.md +++ b/spine-cpp/README.md @@ -50,7 +50,7 @@ target_link_libraries(your_target PRIVATE spine-cpp) - [spine-glfw](../spine-glfw) - [spine-sdl](../spine-sdl) - [spine-sfml](../spine-sfml/cpp) -- [spine-cocos2dx](../spine-cocos2dx) +- [spine-godot](../spine-godot) - [spine-ue](../spine-ue) - [spine-flutter (via spine-c & FFI)](../spine-flutter) - [spine-ios (via spine-c & FFI)](../spine-ios) \ No newline at end of file diff --git a/spine-glfw/README.md b/spine-glfw/README.md index 3e3c37e30..2c06a91b5 100644 --- a/spine-glfw/README.md +++ b/spine-glfw/README.md @@ -60,29 +60,12 @@ The repository includes example code for both C and C++ APIs: - C example: [example/main-c.cpp](example/main-c.cpp) - C++ example: [example/main.cpp](example/main.cpp) -### Building the Examples - -The project includes a `build.sh` script for easy building: - -```bash -cd spine-glfw -./build.sh # Build debug version -./build.sh release # Build release version -./build.sh clean # Clean and rebuild -``` - ### Windows -1. Install [Visual Studio Community](https://visualstudio.microsoft.com/downloads/) with C++ support and Windows SDK. -2. Install [CMake](https://cmake.org/download/) via the Windows installer package. -3. Clone the repository: `git clone https://github.com/esotericsoftware/spine-runtimes` -4. Run CMake GUI from the start menu -5. Set source directory to `spine-runtimes/spine-glfw` -6. Set build directory to `spine-runtimes/spine-glfw/build` -7. Click `Configure`, then `Generate` -8. Open the generated solution in Visual Studio -9. Set `spine-glfw-example` or `spine-glfw-example-c` as the startup project -10. Run the project +1. Install [Visual Studio Community](https://visualstudio.microsoft.com/downloads/). Make sure you install support for C++ and CMake. +2. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip. +3. Open Visual Studio Community, then open `spine-glfw/` via the **Open a local folder** button in the Visual Studio Community launcher. +4. Wait for CMake to finish, then select either `spine-glfw-example.exe` or `spine-glfw-example-c.exe` as the start-up project and start debugging. ### Linux diff --git a/spine-glfw/example/main-c.cpp b/spine-glfw/example/main-c.cpp index 5ea3fd309..9e36c9ff5 100644 --- a/spine-glfw/example/main-c.cpp +++ b/spine-glfw/example/main-c.cpp @@ -143,7 +143,7 @@ int main() { gl::glClear(gl::GL_COLOR_BUFFER_BIT); // Render the skeleton in its current pose - renderer_draw_lite(renderer, skeleton, true); + renderer_draw_c(renderer, skeleton, true); // Present the rendering results and poll for events glfwSwapBuffers(window); diff --git a/spine-glfw/src/spine-glfw.cpp b/spine-glfw/src/spine-glfw.cpp index 2eacaf8e5..1b15c5b2b 100644 --- a/spine-glfw/src/spine-glfw.cpp +++ b/spine-glfw/src/spine-glfw.cpp @@ -315,7 +315,7 @@ void renderer_set_viewport_size(renderer_t *renderer, int width, int height) { shader_set_matrix4(renderer->shader, "uMatrix", matrix); } -void renderer_draw_lite(renderer_t *renderer, spine_skeleton skeleton, bool premultipliedAlpha) { +void renderer_draw_c(renderer_t *renderer, spine_skeleton skeleton, bool premultipliedAlpha) { renderer_draw(renderer, (Skeleton *) skeleton, premultipliedAlpha); } diff --git a/spine-glfw/src/spine-glfw.h b/spine-glfw/src/spine-glfw.h index 5567415f4..d742feec2 100644 --- a/spine-glfw/src/spine-glfw.h +++ b/spine-glfw/src/spine-glfw.h @@ -118,7 +118,7 @@ void renderer_draw(renderer_t *renderer, spine::Skeleton *skeleton, bool premult /// Draws the given skeleton. The atlas must be the atlas from which the drawable /// was constructed. -void renderer_draw_lite(renderer_t *renderer, spine_skeleton skeleton, bool premultipliedAlpha); +void renderer_draw_c(renderer_t *renderer, spine_skeleton skeleton, bool premultipliedAlpha); /// Disposes the renderer void renderer_dispose(renderer_t *renderer); diff --git a/spine-sdl/README.md b/spine-sdl/README.md index 182cbdc4a..94b4d090c 100644 --- a/spine-sdl/README.md +++ b/spine-sdl/README.md @@ -68,16 +68,10 @@ The repository includes example code for both C and C++ APIs: ### Windows -1. Install [Visual Studio Community](https://visualstudio.microsoft.com/downloads/) with C++ support and Windows SDK. -2. Install [CMake](https://cmake.org/download/) via the Windows installer package. -3. Clone the repository: `git clone https://github.com/esotericsoftware/spine-runtimes` -4. Run CMake GUI from the start menu -5. Set source directory to `spine-runtimes/spine-sdl` -6. Set build directory to `spine-runtimes/spine-sdl/build` -7. Click `Configure`, then `Generate` -8. Open the generated solution in Visual Studio -9. Set `spine-sdl-c-example` or `spine-sdl-cpp-example` as the startup project -10. Run the project +1. Install [Visual Studio Community](https://visualstudio.microsoft.com/downloads/). Make sure you install support for C++ and CMake. +2. Download the Spine Runtimes repository using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip. +3. Open Visual Studio Community, then open `spine-sdl/` via the **Open a local folder** button in the Visual Studio Community launcher. +4. Wait for CMake to finish, then select either `spine-sdl-c-example.exe` or `spine-sdl-cpp-example.exe` as the start-up project and start debugging. ### Linux