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.Source
Nested 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 TypeMethodDescriptionvoid
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.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.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.void
addQuad
(Texture tex, int tint, AffineTransform xf, float x, float y, float w, float h) Addstex
as a transformed axis-aligned quad to this batch.void
addQuad
(Texture tex, int tint, AffineTransform xf, float dx, float dy, float dw, float dh, float sx, float sy, float sw, float sh) Addstex
as a transformed axis-aligned quad to this batch.Methods inherited from class playn.core.TexturedBatch
end, setTexture
-
Method Details
-
addQuad
Addstex
as a transformed axis-aligned quad to this batch.x, y, w, h
define 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) Addstex
as a transformed axis-aligned quad to this batch.dx, dy, dw, dh
define the size and position of the quad.sx, sy, sw, sh
define 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, bottom
define the bounds of the quad.sl, st, sr, sb
define 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, ty
define the affine transform applied to the quad.left, top, right, bottom
define the bounds of the quad.sl, st, sr, sb
define 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, ty
define the affine transform applied to the quad.x1, y1, .., x4, y4
define the corners of the quad.sx1, sy1, .., sx4, sy4
define the texture coordinate of the quad.
-