SHARE
TWEET

Untitled

a guest Oct 19th, 2015 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. private Texture textureFromPixmap (Pixmap pixmap){
  2.         Texture texture = new Texture(pixmap.getWidth(), pixmap.getHeight(), Pixmap.Format.RGBA8888);
  3.         texture.bind();
  4.         Gdx.gl.glTexImage2D(GL20.GL_TEXTURE_2D, 0, pixmap.getGLInternalFormat(), pixmap.getWidth(), pixmap.getHeight(), 0,
  5.                 pixmap.getGLFormat(), pixmap.getGLType(), pixmap.getPixels());
  6.         return texture;
  7.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top