Mali OpenGL ES SDK  2.0.0
A simple framework to aid development of OpenGL ES applications targeting ARM Mali platforms.
 All Classes Files Functions Variables Enumerations Enumerator
MaliSDK::ETCHeader Class Reference

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

#include <ETCHeader.h>

List of all members.

Public Member Functions

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

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.


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::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::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.
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.
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.

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