java.lang.Object | |
↳ | android.opengl.ETC1Util |
Utility methods for using ETC1 compressed textures.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ETC1Util.ETC1Texture | A utility class encapsulating a compressed ETC1 texture. |
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Helper function that compresses an image into an ETC1Texture.
| |||||||||||
Create a new ETC1Texture from an input stream containing a PKM formatted compressed texture.
| |||||||||||
Check if ETC1 texture compression is supported by the active OpenGL ES context.
| |||||||||||
Convenience method to load an ETC1 texture whether or not the active OpenGL context
supports the ETC1 texture compression format.
| |||||||||||
Convenience method to load an ETC1 texture whether or not the active OpenGL context
supports the ETC1 texture compression format.
| |||||||||||
Helper function that writes an ETC1Texture to an output stream formatted as a PKM file.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Helper function that compresses an image into an ETC1Texture.
input | a native order direct buffer containing the image data |
---|---|
width | the width of the image in pixels |
height | the height of the image in pixels |
pixelSize | the size of a pixel in bytes (2 or 3) |
stride | the width of a line of the image in bytes |
Create a new ETC1Texture from an input stream containing a PKM formatted compressed texture.
input | an input stream containing a PKM formatted compressed texture. |
---|
IOException |
---|
Check if ETC1 texture compression is supported by the active OpenGL ES context.
Convenience method to load an ETC1 texture whether or not the active OpenGL context supports the ETC1 texture compression format.
target | the texture target. |
---|---|
level | the texture level |
border | the border size. Typically 0. |
fallbackFormat | the format to use if ETC1 texture compression is not supported. Must be GL_RGB. |
fallbackType | the type to use if ETC1 texture compression is not supported. Can be either GL_UNSIGNED_SHORT_5_6_5, which implies 16-bits-per-pixel, or GL_UNSIGNED_BYTE, which implies 24-bits-per-pixel. |
input | the input stream containing an ETC1 texture in PKM format. |
IOException |
---|
Convenience method to load an ETC1 texture whether or not the active OpenGL context supports the ETC1 texture compression format.
target | the texture target. |
---|---|
level | the texture level |
border | the border size. Typically 0. |
fallbackFormat | the format to use if ETC1 texture compression is not supported. Must be GL_RGB. |
fallbackType | the type to use if ETC1 texture compression is not supported. Can be either GL_UNSIGNED_SHORT_5_6_5, which implies 16-bits-per-pixel, or GL_UNSIGNED_BYTE, which implies 24-bits-per-pixel. |
texture | the ETC1 to load. |
Helper function that writes an ETC1Texture to an output stream formatted as a PKM file.
texture | the input texture. |
---|---|
output | the stream to write the formatted texture data to. |
IOException |
---|