OpenGL ES SDK for Android ARM Developer Center
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
MaliSDK::ETCHeader Class Reference

Class to extract information from the ETC headers of compressed textures. More...

#include <ETCHeader.h>

Public Member Functions

 ETCHeader ()
 Default constructor. More...
 
 ETCHeader (unsigned char *data)
 Extract the ETC header information from a loaded ETC compressed texture. More...
 
unsigned short getWidth (void)
 The width of the original texture. More...
 
unsigned short getHeight (void)
 The height of the original texture. More...
 
unsigned short getPaddedWidth (void)
 The width of the compressed texture with the padding added. More...
 
unsigned short getPaddedHeight (void)
 The height of the compressed texture with the padding added. More...
 
GLsizei getSize (GLenum internalFormat)
 The size of the compressed texture with the padding added. More...
 
 ETCHeader ()
 Default constructor. More...
 
 ETCHeader (unsigned char *data)
 Extract the ETC header information from a loaded ETC compressed texture. More...
 
unsigned short getWidth (void)
 The width of the original texture. More...
 
unsigned short getHeight (void)
 The height of the original texture. More...
 
unsigned short getPaddedWidth (void)
 The width of the compressed texture with the padding added. More...
 
unsigned short getPaddedHeight (void)
 The height of the compressed texture with the padding added. More...
 
GLsizei getSize (GLenum internalFormat)
 The size of the compressed texture with the padding added. More...
 

Private Attributes

unsigned char paddedWidthMSB
 
unsigned char paddedWidthLSB
 
unsigned char paddedHeightMSB
 
unsigned char paddedHeightLSB
 
unsigned char widthMSB
 
unsigned char widthLSB
 
unsigned char heightMSB
 
unsigned char heightLSB
 

Detailed Description

Class to extract information from the ETC headers of compressed textures.

Definition at line 38 of file ETCHeader.h.

Constructor & Destructor Documentation

MaliSDK::ETCHeader::ETCHeader ( )

Default constructor.

Definition at line 25 of file ETCHeader.cpp.

MaliSDK::ETCHeader::ETCHeader ( unsigned char *  data)

Extract the ETC header information from a loaded ETC compressed texture.

Definition at line 30 of file ETCHeader.cpp.

MaliSDK::ETCHeader::ETCHeader ( )

Default constructor.

MaliSDK::ETCHeader::ETCHeader ( unsigned char *  data)

Extract the ETC header information from a loaded ETC compressed texture.

Member Function Documentation

unsigned short MaliSDK::ETCHeader::getHeight ( void  )

The height of the original texture.

The height of a compressed texture is padded to 4x4 blocks by the compression method. The resulting height of the compressed texture may therefore be larger if it's original height was not a multiple of 4. By using the unpadded height, the original texture can be drawn.

Returns
The height of the original texture without padding.
unsigned short MaliSDK::ETCHeader::getHeight ( void  )

The height of the original texture.

The height of a compressed texture is padded to 4x4 blocks by the compression method. The resulting height of the compressed texture may therefore be larger if it's original height was not a multiple of 4. By using the unpadded height, the original texture can be drawn.

Returns
The height of the original texture without padding.

Definition at line 53 of file ETCHeader.cpp.

unsigned short MaliSDK::ETCHeader::getPaddedHeight ( void  )

The height of the compressed texture with the padding added.

The height of a compressed texture is padded to 4x4 blocks by the compression method. The resulting height of the compressed texture may therefore be larger if it's original height was not a multiple of 4.

Returns
The height of the compressed texture with padding included.
unsigned short MaliSDK::ETCHeader::getPaddedHeight ( void  )

The height of the compressed texture with the padding added.

The height of a compressed texture is padded to 4x4 blocks by the compression method. The resulting height of the compressed texture may therefore be larger if it's original height was not a multiple of 4.

Returns
The height of the compressed texture with padding included.

Definition at line 63 of file ETCHeader.cpp.

unsigned short MaliSDK::ETCHeader::getPaddedWidth ( void  )

The width of the compressed texture with the padding added.

The width of a compressed texture is padded to 4x4 blocks by the compression method. The resulting width of the compressed texture may therefore be larger if it's original width was not a multiple of 4.

Returns
The width of the compressed texture with padding included.
unsigned short MaliSDK::ETCHeader::getPaddedWidth ( void  )

The width of the compressed texture with the padding added.

The width of a compressed texture is padded to 4x4 blocks by the compression method. The resulting width of the compressed texture may therefore be larger if it's original width was not a multiple of 4.

Returns
The width of the compressed texture with padding included.

Definition at line 58 of file ETCHeader.cpp.

GLsizei MaliSDK::ETCHeader::getSize ( GLenum  internalFormat)

The size of the compressed texture with the padding added.

The size is computed as padded width multiplied by padded height.

Parameters
[in]internalFormatThe internal format of the compressed texture.
Returns
The size of the compressed texture with padding included.
GLsizei MaliSDK::ETCHeader::getSize ( GLenum  internalFormat)

The size of the compressed texture with the padding added.

The size is computed as padded width multiplied by padded height.

Parameters
[in]internalFormatThe internal format of the compressed texture.
Returns
The size of the compressed texture with padding included.

Definition at line 66 of file ETCHeader.cpp.

unsigned short MaliSDK::ETCHeader::getWidth ( void  )

The width of the original texture.

The width of a compressed texture is padded to 4x4 blocks by the compression method. The resulting width of the compressed texture may therefore be larger if it's original width was not a multiple of 4. By using the unpadded width, the original texture can be drawn.

Returns
The width of the original texture without padding.
unsigned short MaliSDK::ETCHeader::getWidth ( void  )

The width of the original texture.

The width of a compressed texture is padded to 4x4 blocks by the compression method. The resulting width of the compressed texture may therefore be larger if it's original width was not a multiple of 4. By using the unpadded width, the original texture can be drawn.

Returns
The width of the original texture without padding.

Definition at line 48 of file ETCHeader.cpp.

Member Data Documentation

unsigned char MaliSDK::ETCHeader::heightLSB
private

Definition at line 48 of file ETCHeader.h.

unsigned char MaliSDK::ETCHeader::heightMSB
private

Definition at line 47 of file ETCHeader.h.

unsigned char MaliSDK::ETCHeader::paddedHeightLSB
private

Definition at line 44 of file ETCHeader.h.

unsigned char MaliSDK::ETCHeader::paddedHeightMSB
private

Definition at line 43 of file ETCHeader.h.

unsigned char MaliSDK::ETCHeader::paddedWidthLSB
private

Definition at line 42 of file ETCHeader.h.

unsigned char MaliSDK::ETCHeader::paddedWidthMSB
private

Definition at line 41 of file ETCHeader.h.

unsigned char MaliSDK::ETCHeader::widthLSB
private

Definition at line 46 of file ETCHeader.h.

unsigned char MaliSDK::ETCHeader::widthMSB
private

Definition at line 45 of file ETCHeader.h.


The documentation for this class was generated from the following files: