libgdx API

com.badlogic.gdx.graphics.glutils
Class ETC1.ETC1Data

java.lang.Object
  extended by com.badlogic.gdx.graphics.glutils.ETC1.ETC1Data
All Implemented Interfaces:
Disposable
Enclosing class:
ETC1

public static final class ETC1.ETC1Data
extends java.lang.Object
implements Disposable

Class for storing ETC1 compressed image data.

Author:
mzechner

Field Summary
 java.nio.ByteBuffer compressedData
          the optional PKM header and compressed image data
 int dataOffset
          the offset in bytes to the actual compressed data.
 int height
          the height in pixels
 int width
          the width in pixels
 
Constructor Summary
ETC1.ETC1Data(FileHandle pkmFile)
           
ETC1.ETC1Data(int width, int height, java.nio.ByteBuffer compressedData, int dataOffset)
           
 
Method Summary
 void dispose()
          Releases the native resources of the ETC1Data instance.
 boolean hasPKMHeader()
           
 java.lang.String toString()
           
 void write(FileHandle file)
          Writes the ETC1Data with a PKM header to the given file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

width

public final int width
the width in pixels


height

public final int height
the height in pixels


compressedData

public final java.nio.ByteBuffer compressedData
the optional PKM header and compressed image data


dataOffset

public final int dataOffset
the offset in bytes to the actual compressed data. Might be 16 if this contains a PKM header, 0 otherwise

Constructor Detail

ETC1.ETC1Data

public ETC1.ETC1Data(int width,
                     int height,
                     java.nio.ByteBuffer compressedData,
                     int dataOffset)

ETC1.ETC1Data

public ETC1.ETC1Data(FileHandle pkmFile)
Method Detail

hasPKMHeader

public boolean hasPKMHeader()
Returns:
whether this ETC1Data has a PKM header

write

public void write(FileHandle file)
Writes the ETC1Data with a PKM header to the given file.

Parameters:
file - the file.

dispose

public void dispose()
Releases the native resources of the ETC1Data instance.

Specified by:
dispose in interface Disposable

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)