diff --git a/spine-sfml/cpp/src/spine/spine-sfml.cpp b/spine-sfml/cpp/src/spine/spine-sfml.cpp index 8b98c2a03..a1cbdb963 100644 --- a/spine-sfml/cpp/src/spine/spine-sfml.cpp +++ b/spine-sfml/cpp/src/spine/spine-sfml.cpp @@ -123,7 +123,7 @@ namespace spine { uvs = ®ionAttachment->getUVs(); indices = &quadIndices; indicesCount = 6; - texture = (Texture *) regionAttachment->getRegion()->rendererObject; + texture = (Texture *) ((AtlasRegion*)regionAttachment->getRegion())->page->texture; } else if (attachment->getRTTI().isExactly(MeshAttachment::rtti)) { MeshAttachment *mesh = (MeshAttachment *) attachment; @@ -140,7 +140,7 @@ namespace spine { uvs = &mesh->getUVs(); indices = &mesh->getTriangles(); indicesCount = mesh->getTriangles().size(); - texture = (Texture *) ((AtlasRegion *) mesh->getRendererObject())->page->getRendererObject(); + texture = (Texture *) ((AtlasRegion*)mesh->getRegion())->page->texture; } else if (attachment->getRTTI().isExactly(ClippingAttachment::rtti)) { ClippingAttachment *clip = (ClippingAttachment *) slot.getAttachment();