diff --git a/spine-sdl/README.md b/spine-sdl/README.md index 565a90ac5..e5ed9d110 100644 --- a/spine-sdl/README.md +++ b/spine-sdl/README.md @@ -24,7 +24,7 @@ spine-sdl supports all Spine features except premultiplied alpha, screen blend m 1. Create a new SDL project. See the [SDL documentation](https://wiki.libsdl.org/FrontPage) or have a look at the example in this repository. 2. Download the Spine Runtimes source using git (`git clone https://github.com/esotericsoftware/spine-runtimes`) or download it as a zip via the download button above. 3. If you are using C, add the sources from `spine-c/spine-c/src/spine` and `spine-sdl/src/spine-sdl-c.c` to your project, and add the folder `spine-c/spine-c/include` and `spine-sdl/src/spine-sdl-c.h` to your header search path. Note that includes are specified as `#inclue `, so the `spine` directory cannot be omitted when copying the source files. -3. If you are using C++, add the sources from `spine-cpp/spine-cpp/src/spine` and `spine-sdl/src/spine-sdl-cpp.cpp` to your project, and add the folder `spine-cpp/spine-cpp/include` and `spine-sdl/src/spine-sdl-cpp.h` to your header search path. Note that includes are specified as `#inclue `, so the `spine` directory cannot be omitted when copying the source files. +3. If you are using C++, add the sources from `spine-cpp/spine-cpp/src/spine` and `spine-sdl/src/spine-sdl-cpp.cpp` to your project, and add the folder `spine-cpp/spine-cpp/include` and `spine-sdl/src/spine-sdl-cpp.h` to your header search path. Note that includes are specified as `#include `, so the `spine` directory cannot be omitted when copying the source files. See the [Spine Runtimes documentation](http://esotericsoftware.com/spine-documentation#runtimesTitle) on how to use the APIs or check out the Spine SDL example in this repository. diff --git a/spine-sdl/src/spine-sdl-cpp.cpp b/spine-sdl/src/spine-sdl-cpp.cpp index 365abf221..353a8b3ef 100644 --- a/spine-sdl/src/spine-sdl-cpp.cpp +++ b/spine-sdl/src/spine-sdl-cpp.cpp @@ -114,8 +114,8 @@ void SkeletonDrawable::draw(SDL_Renderer *renderer) { } worldVertices.setSize(mesh->getWorldVerticesLength(), 0); - texture = (SDL_Texture *) ((AtlasRegion *) mesh->getRendererObject())->page->getRendererObject(); mesh->computeWorldVertices(slot, 0, mesh->getWorldVerticesLength(), worldVertices.buffer(), 0, 2); + texture = (SDL_Texture *) ((AtlasRegion *) mesh->getRendererObject())->page->getRendererObject(); verticesCount = mesh->getWorldVerticesLength() >> 1; uvs = &mesh->getUVs(); indices = &mesh->getTriangles();