net.mostlyoriginal.api.system.render.ClearScreenSystem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of contrib-jam Show documentation
Show all versions of contrib-jam Show documentation
Jam bundle of systems and components!
The newest version!
package net.mostlyoriginal.api.system.render;
import com.artemis.BaseSystem;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.GL20;
/**
* Clearing the screenc color buffer with GL.
*
* @author Daan van Yperen
*/
public class ClearScreenSystem extends BaseSystem {
private final Color color;
public ClearScreenSystem() {
this(Color.BLACK);
}
public ClearScreenSystem(Color color) {
this.color = color;
}
@Override
protected void processSystem( ) {
Gdx.gl.glClearColor(color.r, color.g,color.b,color.a);
Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy