public class UniformQuadBatch extends QuadBatch
Modifier and Type | Class and Description |
---|---|
static class |
UniformQuadBatch.Source
The source for the stock quad batch shader program.
|
Closeable.Set, Closeable.Util
gl
Constructor and Description |
---|
UniformQuadBatch(GL20 gl)
Creates a uniform quad batch with the default shader programs.
|
UniformQuadBatch(GL20 gl,
UniformQuadBatch.Source source)
Creates a uniform quad batch with the supplied custom shader program builder.
|
Modifier and Type | Method and Description |
---|---|
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 |
begin(float fbufWidth,
float fbufHeight,
boolean flip)
Must be called before this batch is used to accumulate and send drawing commands.
|
void |
close()
Releases any GPU resources retained by this batch.
|
void |
end()
Must be called when one is done using this batch to accumulate and send drawing commands.
|
void |
flush()
Sends any accumulated drawing calls to the GPU.
|
static boolean |
isLikelyToPerform(GL20 gl)
Returns false if the GL context doesn't support sufficient numbers of vertex uniform vectors
to allow this shader to run with good performance, true otherwise.
|
java.lang.String |
toString() |
setTexture
public UniformQuadBatch(GL20 gl)
public UniformQuadBatch(GL20 gl, UniformQuadBatch.Source source)
public static boolean isLikelyToPerform(GL20 gl)
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)
QuadBatch
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.public void begin(float fbufWidth, float fbufHeight, boolean flip)
GLBatch
public void flush()
GLBatch
public void end()
GLBatch
GLBatch.flush()
and marks this batch as inactive.end
in class TexturedBatch
public void close()
GLBatch
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2019. All Rights Reserved.