Package com.badlogic.gdx.graphics

Examples of com.badlogic.gdx.graphics.TextureData


        EventQueue.invokeLater(new Runnable() {
          public void run () {
            final ByteBuffer buffer = ByteBuffer.allocateDirect(1024 * 1024 * 4);
            buffer.order(ByteOrder.LITTLE_ENDIAN);
            fontGenerator.getTextureData(buffer.asIntBuffer());
            TextureRegion glyphRegion = new TextureRegion(new Texture(new TextureData() {
              Pixmap pixmap;

              public int getWidth () {
                return width;
              }
View Full Code Here


        EventQueue.invokeLater(new Runnable() {
          public void run () {
            final ByteBuffer buffer = ByteBuffer.allocateDirect(1024 * 1024 * 4);
            buffer.order(ByteOrder.LITTLE_ENDIAN);
            fontGenerator.getTextureData(buffer.asIntBuffer());
            TextureRegion glyphRegion = new TextureRegion(new Texture(new TextureData() {
              Pixmap pixmap;

              public int getWidth () {
                return width;
              }
View Full Code Here

        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
   
    @Override
    public boolean isTransparent(int x, int y){
        TextureData data = image.getTexture().getTextureData();
        if (!data.isPrepared()){
            data.prepare();
        }
        int pixel = data.consumePixmap().getPixel(x, y);
        pixel &= 0x000000ff;
        return pixel == 0;
    }
View Full Code Here

TOP

Related Classes of com.badlogic.gdx.graphics.TextureData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.