Package de.matthiasmann.twl.utils

Examples of de.matthiasmann.twl.utils.PNGDecoder


      boolean genMipmap) throws IOException {
    //TODO: npot check
    InputStream input = null;
    try {
      input = pngRef.openStream();
      PNGDecoder dec = new PNGDecoder(input);
     
      width = dec.getWidth();
      height = dec.getHeight();
      ByteBuffer buf = BufferUtils.createByteBuffer(4 * width * height);
      dec.decode(buf, width * 4, PNGDecoder.Format.RGBA);
      buf.flip();
     
      glEnable(getTarget());
      id = glGenTextures();

View Full Code Here

TOP

Related Classes of de.matthiasmann.twl.utils.PNGDecoder

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.