Class ETC1.ETC1Data
- java.lang.Object
-
- 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.
-
-
Field Summary
Fields Modifier and Type Field Description java.nio.ByteBuffercompressedDatathe optional PKM header and compressed image dataintdataOffsetthe offset in bytes to the actual compressed data.intheightthe height in pixelsintwidththe width in pixels
-
Constructor Summary
Constructors Constructor Description ETC1Data(int width, int height, java.nio.ByteBuffer compressedData, int dataOffset)ETC1Data(FileHandle pkmFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddispose()Releases the native resources of the ETC1Data instance.booleanhasPKMHeader()java.lang.StringtoString()voidwrite(FileHandle file)Writes the ETC1Data with a PKM header to the given file.
-
-
-
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
-
ETC1Data
public ETC1Data(int width, int height, java.nio.ByteBuffer compressedData, int dataOffset)
-
ETC1Data
public 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:
disposein interfaceDisposable
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-