use of com.badlogic.gdx.graphics.glutils.ImmediateModeRenderer in project commons-gdx by gemserk.
the class ImmediateModeRendererUtils method drawRectangle.
public static void drawRectangle(float x0, float y0, float x1, float y1, Color color) {
ImmediateModeRenderer renderer = getRenderer();
renderer.begin(getProjectionMatrix(), GL10.GL_LINE_LOOP);
{
renderer.color(color.r, color.g, color.b, color.a);
renderer.vertex(x0, y0, 0f);
renderer.color(color.r, color.g, color.b, color.a);
renderer.vertex(x0, y1, 0f);
renderer.color(color.r, color.g, color.b, color.a);
renderer.vertex(x1, y1, 0f);
renderer.color(color.r, color.g, color.b, color.a);
renderer.vertex(x1, y0, 0f);
}
renderer.end();
}
Aggregations