Package playn.core
Class QuadBatch
java.lang.Object
playn.core.GLBatch
playn.core.TexturedBatch
playn.core.QuadBatch
- All Implemented Interfaces:
AutoCloseable,Closeable
- Direct Known Subclasses:
TriangleBatch,UniformQuadBatch
A batch which can render textured quads. Since that's a pretty common thing to do, we factor out
this API, and allow for different implementations thereof.
-
Nested Class Summary
Nested classes/interfaces inherited from class playn.core.TexturedBatch
TexturedBatch.SourceNested classes/interfaces inherited from interface react.Closeable
Closeable.Set, Closeable.Util -
Field Summary
Fields inherited from class playn.core.TexturedBatch
gl -
Method Summary
Modifier and TypeMethodDescriptionvoidaddQuad(int tint, float m00, float m01, float m10, float m11, float tx, float ty, float left, float top, float right, float bottom, float sl, float st, float sr, float sb) Adds a transformed axis-aligned quad to this batch.abstract voidaddQuad(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) Adds a transformed axis-aligned quad to this batch.voidaddQuad(int tint, AffineTransform xf, float left, float top, float right, float bottom, float sl, float st, float sr, float sb) Adds a transformed axis-aligned quad to this batch.voidaddQuad(Texture tex, int tint, AffineTransform xf, float x, float y, float w, float h) Addstexas a transformed axis-aligned quad to this batch.voidaddQuad(Texture tex, int tint, AffineTransform xf, float dx, float dy, float dw, float dh, float sx, float sy, float sw, float sh) Addstexas a transformed axis-aligned quad to this batch.Methods inherited from class playn.core.TexturedBatch
end, setTexture
-
Method Details
-
addQuad
Addstexas a transformed axis-aligned quad to this batch.x, y, w, hdefine the size and position of the quad. -
addQuad
public void addQuad(Texture tex, int tint, AffineTransform xf, float dx, float dy, float dw, float dh, float sx, float sy, float sw, float sh) Addstexas a transformed axis-aligned quad to this batch.dx, dy, dw, dhdefine the size and position of the quad.sx, sy, sw, shdefine region of the texture which will be displayed in the quad. -
addQuad
public void addQuad(int tint, AffineTransform xf, float left, float top, float right, float bottom, float sl, float st, float sr, float sb) Adds a transformed axis-aligned quad to this batch.left, top, right, bottomdefine the bounds of the quad.sl, st, sr, sbdefine the texture coordinates. -
addQuad
public void addQuad(int tint, float m00, float m01, float m10, float m11, float tx, float ty, float left, float top, float right, float bottom, float sl, float st, float sr, float sb) Adds a transformed axis-aligned quad to this batch.m00, m01, m10, m11, tx, tydefine the affine transform applied to the quad.left, top, right, bottomdefine the bounds of the quad.sl, st, sr, sbdefine the texture coordinates. -
addQuad
public abstract 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) Adds a transformed axis-aligned quad to this batch.m00, m01, m10, m11, tx, tydefine the affine transform applied to the quad.x1, y1, .., x4, y4define the corners of the quad.sx1, sy1, .., sx4, sy4define the texture coordinate of the quad.
-