![]() Open a terminal and install CMake via brew install cmake.spine-sdl-c-example (C) or by cd spine-sdl &. Open a terminal, and cd into the spine-runtimes/spine-sdl folder.The entire example code is contained in main.cpp Linux Click Local Windows Debugger to run the example.Right click the spine-sdl-example-c or spine-sdl-example-cpp project in the solution explorer and select Set as Startup Project from the context menus.Open the spine.sln file in Visual Studio.This will create a Visual Studio solution file called spine.sln in spine-runtimes/spine-sdl/build and also download the SDL dependencies. You can create the build folder directly in the file dialog via New Folder. Click Browse Build and select the spine-runtimes/spine-sdl/build directory.Click Browse Source and select the directory spine-runtimes.Download the Spine Runtimes repository using git ( git clone ) or download it as a zip via the download button above.Install CMake via the Windows installer package.For a spine-c based example, see example/main.c, for a spine-cpp example see example/main.cpp. ![]() The spine-sdl example works on Windows, Linux and Mac OS X. Ealer versions of SDL are not compatible with spine-sdl. Note: spine-sdl requires the SDL_RenderGeometry API which is available since SDL 2.0.18. In your C or C++ code, include either of the following header files to get access to the spine-sdl API: ![]() Add the folders spine-cpp/spine-cpp/include and spine-sdl/src to your header search path.Add the sources from spine-cpp/spine-cpp/src/spine and the file spine-sdl/src/spine-sdl-cpp.cpp to your project.Add the folders spine-c/spine-c/include and spine-sdl/src/ to your header search path.Add the sources from spine-c/spine-c/src/spine and the file spine-sdl/src/spine-sdl-c.c to your project.Download the Spine Runtimes source using git ( git clone ).See the SDL documentation or have a look at the example in spine-runtimes repository, which uses CMake as the build system. To integrate spine-sdl into your project: ![]() The C API is based on the generic spine-c runtime, the C++ API is based on generic spine-cpp runtime. The spine-sdl runtime is available as a C and C++ API. Please see the Spine Runtimes License before integrating the Spine Runtimes into your applications. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |