com.gempukku.libgdx.graph.util.WhitePixel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of libgdx-graph Show documentation
Show all versions of libgdx-graph Show documentation
libGDX-graph runtime library for pipeline rendering
The newest version!
package com.gempukku.libgdx.graph.util;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.Pixmap;
import com.badlogic.gdx.graphics.Texture;
import com.badlogic.gdx.graphics.g2d.TextureRegion;
public class WhitePixel {
public static WhitePixel sharedInstance;
public static void initializeShared() {
sharedInstance = new WhitePixel();
}
public static void disposeShared() {
sharedInstance.dispose();
}
public Texture texture;
public TextureRegion textureRegion;
public WhitePixel() {
Pixmap pixmap = new Pixmap(1, 1, Pixmap.Format.RGB888);
pixmap.setColor(Color.WHITE);
pixmap.fill();
texture = new Texture(pixmap);
textureRegion = new TextureRegion(texture);
pixmap.dispose();
}
public void dispose() {
texture.dispose();
texture = null;
textureRegion = null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy