/** * Prepares to add primitives with the specified tint and transform. This configures * {@link #stableAttrs} with all of the attributes that are the same for every vertex. */ public void prepare (int tint, AffineTransform xf) { prepare(tint, xf.m00, xf.m01, xf.m10, xf.m11, xf.tx, xf.ty); }
/** * Prepares to add primitives with the specified tint and transform. This configures * {@link #stableAttrs} with all of the attributes that are the same for every vertex. */ public void prepare (int tint, AffineTransform xf) { prepare(tint, xf.m00, xf.m01, xf.m10, xf.m11, xf.tx, xf.ty); }
/** * Adds a collection of textured triangles to the current render operation. See * {@link #addTris(Texture,int,AffineTransform,float[],int,int,float,float,int[],int,int,int)} * for parameter documentation. * * @param sxys a list of sx/sy texture coordinates as: {@code [sx1, sy1, sx2, sy2, ...]}. This * must be of the same length as {@code xys}. */ public void addTris (Texture tex, int tint, AffineTransform xf, float[] xys, float[] sxys, int xysOffset, int xysLen, int[] indices, int indicesOffset, int indicesLen, int indexBase) { setTexture(tex); prepare(tint, xf); addTris(xys, sxys, xysOffset, xysLen, indices, indicesOffset, indicesLen, indexBase); }
/** * Adds a collection of textured triangles to the current render operation. See * {@link #addTris(Texture,int,AffineTransform,float[],int,int,float,float,int[],int,int,int)} * for parameter documentation. * * @param sxys a list of sx/sy texture coordinates as: {@code [sx1, sy1, sx2, sy2, ...]}. This * must be of the same length as {@code xys}. */ public void addTris (Texture tex, int tint, AffineTransform xf, float[] xys, float[] sxys, int xysOffset, int xysLen, int[] indices, int indicesOffset, int indicesLen, int indexBase) { setTexture(tex); prepare(tint, xf); addTris(xys, sxys, xysOffset, xysLen, indices, indicesOffset, indicesLen, indexBase); }
int[] indices, int indicesOffset, int indicesLen, int indexBase) { setTexture(tex); prepare(tint, xf); addTris(xys, xysOffset, xysLen, tw, th, indices, indicesOffset, indicesLen, indexBase);
int[] indices, int indicesOffset, int indicesLen, int indexBase) { setTexture(tex); prepare(tint, xf); addTris(xys, xysOffset, xysLen, tw, th, indices, indicesOffset, indicesLen, indexBase);
@Override public void addQuad (int tint, float m00, float m01, float m10, float m11, float tx, float ty, float x1, float y1, float sx1, float sy1, float x2, float y2, float sx2, float sy2, float x3, float y3, float sx3, float sy3, float x4, float y4, float sx4, float sy4) { prepare(tint, m00, m01, m10, m11, tx, ty); int vertIdx = beginPrimitive(4, 6); int offset = vertPos; float[] verts = vertices, stables = stableAttrs; offset = add(verts, add(verts, offset, stables), x1, y1, sx1, sy1); offset = add(verts, add(verts, offset, stables), x2, y2, sx2, sy2); offset = add(verts, add(verts, offset, stables), x3, y3, sx3, sy3); offset = add(verts, add(verts, offset, stables), x4, y4, sx4, sy4); vertPos = offset; addElems(vertIdx, QUAD_INDICES, 0, QUAD_INDICES.length, 0); }
@Override public void addQuad (int tint, float m00, float m01, float m10, float m11, float tx, float ty, float x1, float y1, float sx1, float sy1, float x2, float y2, float sx2, float sy2, float x3, float y3, float sx3, float sy3, float x4, float y4, float sx4, float sy4) { prepare(tint, m00, m01, m10, m11, tx, ty); int vertIdx = beginPrimitive(4, 6); int offset = vertPos; float[] verts = vertices, stables = stableAttrs; offset = add(verts, add(verts, offset, stables), x1, y1, sx1, sy1); offset = add(verts, add(verts, offset, stables), x2, y2, sx2, sy2); offset = add(verts, add(verts, offset, stables), x3, y3, sx3, sy3); offset = add(verts, add(verts, offset, stables), x4, y4, sx4, sy4); vertPos = offset; addElems(vertIdx, QUAD_INDICES, 0, QUAD_INDICES.length, 0); }