diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java index 4290b7c42..71c57e8a7 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/SkeletonRenderer.java @@ -53,8 +53,8 @@ public class SkeletonRenderer implements Disposable { private boolean premultipliedAlpha; private final FloatArray vertices = new FloatArray(32); - private ImmediateModeRenderer renderer; private final SkeletonClipping clipper = new SkeletonClipping(); + private ImmediateModeRenderer renderer; public void draw (Batch batch, Skeleton skeleton) { boolean premultipliedAlpha = this.premultipliedAlpha; @@ -136,7 +136,7 @@ public class SkeletonRenderer implements Disposable { float r = skeletonColor.r, g = skeletonColor.g, b = skeletonColor.b, a = skeletonColor.a; Array drawOrder = skeleton.drawOrder; for (int i = 0, n = drawOrder.size; i < n; i++) { - final int vertexSize = clipper.isClipping() ? 2 : 5; + int vertexSize = clipper.isClipping() ? 2 : 5; Slot slot = drawOrder.get(i); Attachment attachment = slot.attachment; if (attachment instanceof RegionAttachment) { @@ -238,8 +238,8 @@ public class SkeletonRenderer implements Disposable { float r = skeletonColor.r, g = skeletonColor.g, b = skeletonColor.b, a = skeletonColor.a; Array drawOrder = skeleton.drawOrder; for (int i = 0, n = drawOrder.size; i < n; i++) { - final int vertexSize = clipper.isClipping() ? 2 : 6; Slot slot = drawOrder.get(i); + int vertexSize = clipper.isClipping() ? 2 : 6; Attachment attachment = slot.attachment; if (attachment instanceof RegionAttachment) { RegionAttachment region = (RegionAttachment)attachment; diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java index 954c0ad14..924fc9f08 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/attachments/VertexAttachment.java @@ -53,7 +53,8 @@ public class VertexAttachment extends Attachment { * Runtimes Guide. * @param start The index of the first {@link #getVertices()} value to transform. Each vertex has 2 values, x and y. * @param count The number of world vertex values to output. Must be <= {@link #getWorldVerticesLength()} - start. - * @param worldVertices The output world vertices. Must have a length >= offset + count. + * @param worldVertices The output world vertices. Must have a length >= offset + count * + * stride / 2. * @param offset The worldVertices index to begin writing values. * @param stride The number of worldVertices entries between the value pairs written. */ public void computeWorldVertices (Slot slot, int start, int count, float[] worldVertices, int offset, int stride) { @@ -142,8 +143,8 @@ public class VertexAttachment extends Attachment { this.vertices = vertices; } - /** The maximum length required of the worldVertices passed to - * {@link #computeWorldVertices(Slot, int, int, float[], int, int)}. */ + /** The maximum number of world vertex values that can be output by + * {@link #computeWorldVertices(Slot, int, int, float[], int, int)} using the count parameter. */ public int getWorldVerticesLength () { return worldVerticesLength; } diff --git a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/utils/SkeletonClipping.java b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/utils/SkeletonClipping.java index bf39d78bc..63df8c4af 100644 --- a/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/utils/SkeletonClipping.java +++ b/spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/utils/SkeletonClipping.java @@ -75,7 +75,7 @@ public class SkeletonClipping { return clipAttachment != null; } - public void clipTriangles (float[] vertices, int verticesLength, short[] triangles, int trianglesLength, float uvs[], + public void clipTriangles (float[] vertices, int verticesLength, short[] triangles, int trianglesLength, float[] uvs, float light, float dark, boolean twoColor) { Clipper clipper = this.clipper;