List of usage examples for com.badlogic.gdx.graphics GL20 GL_ALPHA
int GL_ALPHA
To view the source code for com.badlogic.gdx.graphics GL20 GL_ALPHA.
Click Source Link
From source file:com.watabou.glwrap.NoosaTexture.java
License:Open Source License
public void pixels(int w, int h, byte[] pixels) { bind();/* w ww.jav a 2 s .c o m*/ ByteBuffer imageBuffer = ByteBuffer.allocateDirect(w * h).order(ByteOrder.nativeOrder()); imageBuffer.put(pixels); imageBuffer.position(0); Gdx.gl.glPixelStorei(GL20.GL_UNPACK_ALIGNMENT, 1); Gdx.gl.glTexImage2D(GL20.GL_TEXTURE_2D, 0, GL20.GL_ALPHA, w, h, 0, GL20.GL_ALPHA, GL20.GL_UNSIGNED_BYTE, imageBuffer); }