use of com.badlogic.gdx.graphics.GL10 in project commons-gdx by gemserk.
the class ImmediateModeRendererUtils method draw.
public static void draw(Triangulator triangulator, float x, float y, float angle, Color color) {
GL10 gl = Gdx.graphics.getGL10();
gl.glPushMatrix();
gl.glTranslatef(x, y, 0f);
gl.glRotatef(angle, 0f, 0f, 1f);
ImmediateModeRenderer renderer = getRenderer();
renderer.begin(getProjectionMatrix(), GL10.GL_TRIANGLES);
for (int i = 0; i < triangulator.getTriangleCount(); i++) {
for (int p = 0; p < 3; p++) {
float[] pt = triangulator.getTrianglePoint(i, p);
renderer.color(color.r, color.g, color.b, color.a);
renderer.vertex(pt[0], pt[1], 0f);
}
}
renderer.end();
gl.glPopMatrix();
}
use of com.badlogic.gdx.graphics.GL10 in project commons-gdx by gemserk.
the class Mesh2dRenderUtils method draw.
public static void draw(int primitiveType, Mesh2d mesh2d, float x, float y, float angle) {
GL10 gl = Gdx.graphics.getGL10();
gl.glPushMatrix();
gl.glTranslatef(x, y, 0f);
gl.glRotatef(angle, 0f, 0f, 1f);
draw(primitiveType, mesh2d);
gl.glPopMatrix();
}
Aggregations