use of com.watabou.glwrap.Vertexbuffer in project shattered-pixel-dungeon-gdx by 00-Evan.
the class ItemSprite method draw.
@Override
public void draw() {
if (texture == null || (!dirty && buffer == null))
return;
if (renderShadow) {
if (dirty) {
verticesBuffer.position(0);
verticesBuffer.put(vertices);
if (buffer == null)
buffer = new Vertexbuffer(verticesBuffer);
else
buffer.updateVertices(verticesBuffer);
dirty = false;
}
NoosaScript script = script();
texture.bind();
script.camera(camera());
updateMatrix();
script.uModel.valueM4(shadowMatrix);
script.lighting(0, 0, 0, am * .6f, 0, 0, 0, aa * .6f);
script.drawQuad(buffer);
}
super.draw();
}
use of com.watabou.glwrap.Vertexbuffer in project shattered-pixel-dungeon-gdx by 00-Evan.
the class KeyDisplay method draw.
@Override
public void draw() {
super.draw();
if (dirty) {
updateVertices();
quads.limit(quads.position());
if (buffer == null)
buffer = new Vertexbuffer(quads);
else
buffer.updateVertices(quads);
}
NoosaScript script = NoosaScript.get();
tx.bind();
script.camera(camera());
script.uModel.valueM4(matrix);
script.lighting(rm, gm, bm, am, ra, ga, ba, aa);
script.drawQuadSet(buffer, totalKeys, 0);
}
use of com.watabou.glwrap.Vertexbuffer in project shattered-pixel-dungeon-gdx by 00-Evan.
the class CharSprite method draw.
@Override
public void draw() {
if (texture == null || (!dirty && buffer == null))
return;
if (renderShadow) {
if (dirty) {
verticesBuffer.position(0);
verticesBuffer.put(vertices);
if (buffer == null)
buffer = new Vertexbuffer(verticesBuffer);
else
buffer.updateVertices(verticesBuffer);
dirty = false;
}
NoosaScript script = script();
texture.bind();
script.camera(camera());
updateMatrix();
script.uModel.valueM4(shadowMatrix);
script.lighting(0, 0, 0, am * .6f, 0, 0, 0, aa * .6f);
script.drawQuad(buffer);
}
super.draw();
}
Aggregations