Examples of Pixmap


Examples of com.badlogic.gdx.graphics.Pixmap

  @Override
  public Pixmap consumePixmap () {
    if (!isPrepared) throw new GdxRuntimeException("Call prepare() before calling getPixmap()");
    isPrepared = false;
    Pixmap pixmap = this.pixmap;
    this.pixmap = null;
    return pixmap;
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

  }

  @Override
  public void glTexImage2D (int target, int level, int internalformat, int width, int height, int border, int format, int type,
    Buffer pixels) {
    Pixmap pixmap = Pixmap.pixmaps.get(((IntBuffer)pixels).get(0));
    gl.texImage2D(target, level, internalformat, format, type, pixmap.getCanvasElement());
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

  }

  @Override
  public void glTexSubImage2D (int target, int level, int xoffset, int yoffset, int width, int height, int format, int type,
    Buffer pixels) {
    Pixmap pixmap = Pixmap.pixmaps.get(((IntBuffer)pixels).get(0));
    gl.texSubImage2D(target, level, xoffset, yoffset, width, height, pixmap.getCanvasElement());
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

                return height;
              }

              @Override
              public Pixmap consumePixmap () {
                this.pixmap = new Pixmap(width, height, Format.RGBA8888);
                pixmap.getPixels().put(buffer);
                pixmap.getPixels().rewind();
                return pixmap;
              }
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

    }

    @Override
    protected void processFile (Entry entry) throws Exception {
      System.out.println("Processing " + entry.inputFile);
      Pixmap pixmap = new Pixmap(new FileHandle(entry.inputFile));
      if (pixmap.getFormat() != Format.RGB888 && pixmap.getFormat() != Format.RGB565) {
        System.out.println("Converting from " + pixmap.getFormat() + " to RGB888!");
        Pixmap tmp = new Pixmap(pixmap.getWidth(), pixmap.getHeight(), Format.RGB888);
        tmp.drawPixmap(pixmap, 0, 0, 0, 0, pixmap.getWidth(), pixmap.getHeight());
        pixmap.dispose();
        pixmap = tmp;
      }
      ETC1.encodeImagePKM(pixmap).write(new FileHandle(entry.outputFile));
      pixmap.dispose();
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

          + config.fullscreen);

      if (config.iconPaths.size > 0) {
        ByteBuffer[] icons = new ByteBuffer[config.iconPaths.size];
        for (int i = 0, n = config.iconPaths.size; i < n; i++) {
          Pixmap pixmap = new Pixmap(Gdx.files.getFileHandle(config.iconPaths.get(i), config.iconFileTypes.get(i)));
          if (pixmap.getFormat() != Format.RGBA8888) {
            Pixmap rgba = new Pixmap(pixmap.getWidth(), pixmap.getHeight(), Format.RGBA8888);
            rgba.drawPixmap(pixmap, 0, 0);
            pixmap = rgba;
          }
          icons[i] = ByteBuffer.allocateDirect(pixmap.getPixels().limit());
          icons[i].put(pixmap.getPixels()).flip();
          pixmap.dispose();
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

                return height;
              }

              @Override
              public Pixmap consumePixmap () {
                this.pixmap = new Pixmap(width, height, Format.RGBA8888);
                pixmap.getPixels().put(buffer);
                pixmap.getPixels().rewind();
                return pixmap;
              }
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

  }

  @Override
  public void glTexImage2D (int target, int level, int internalformat, int width, int height, int border, int format, int type,
    Buffer pixels) {
    Pixmap pixmap = Pixmap.pixmaps.get(((IntBuffer)pixels).get(0));
    gl.texImage2D(target, level, internalformat, format, type, pixmap.getCanvasElement());
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

  }

  @Override
  public void glTexSubImage2D (int target, int level, int xoffset, int yoffset, int width, int height, int format, int type,
    Buffer pixels) {
    Pixmap pixmap = Pixmap.pixmaps.get(((IntBuffer)pixels).get(0));
    gl.texSubImage2D(target, level, xoffset, yoffset, width, height, pixmap.getCanvasElement());
  }
View Full Code Here

Examples of com.badlogic.gdx.graphics.Pixmap

    }



    public GDXImageCatalog(AtlasRegion fromRegion, String fromDir) {       
        this (fromRegion, new Pixmap (Gdx.files.getFileHandle(fromDir+fromRegion.name+".png", Files.FileType.Internal)));

        //Log.info("NAMENAMENAME: "+fromRegion.name);
       
        //fillTransparencyMap();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.