List of usage examples for com.badlogic.gdx.graphics.glutils PixmapTextureData PixmapTextureData
public PixmapTextureData(Pixmap pixmap, Format format, boolean useMipMaps, boolean disposePixmap, boolean managed)
From source file:com.cyphercove.doublehelix.PowerLUT.java
License:Apache License
/** W power will be in luminance, and H power will be in alpha**/ public PowerLUT(float powerW, float intensityW, float powerH, float intensityH, int width, int height) { Pixmap pixmap = new Pixmap(width, height, Format.RGBA8888); for (int i = 0; i < width; i++) { float valueW = (float) Math.pow((float) i / width, powerW) * intensityW; for (int j = 0; j < height; j++) { float valueH = (float) Math.pow((float) j / height, powerH) * intensityH; pixmap.setColor(valueW, valueH, 1.0f, 1.0f); pixmap.drawPixel(i, j);/*from w ww .j av a2 s . c o m*/ } } PixmapTextureData data = new PixmapTextureData(pixmap, Format.RGBA8888, false, false, true); texture = new Texture(data); texture.setWrap(TextureWrap.ClampToEdge, TextureWrap.ClampToEdge); texture.setFilter(TextureFilter.Linear, TextureFilter.Linear); }
From source file:com.trgk.touchwave.tgengine.TGResources.java
License:Open Source License
void initRectTexture() { Pixmap map = new Pixmap(1, 1, Pixmap.Format.RGBA8888); map.setColor(1, 1, 1, 1);/*ww w . j a v a2s. c o m*/ map.fill(); PixmapTextureData textureData = new PixmapTextureData(map, null, false, false, true); rectTexture = new Texture(textureData); rectTexture.setFilter(Texture.TextureFilter.Linear, Texture.TextureFilter.Linear); rectTextureRegion = new TextureRegion(rectTexture); }