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.ByteBuffer
compressedData
the optional PKM header and compressed image dataint
dataOffset
the offset in bytes to the actual compressed data.int
height
the height in pixelsint
width
the 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 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.
-
-
-
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:
dispose
in interfaceDisposable
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-