Functions for working with textures.
More...
#include <Texture.h>
List of all members.
Static Public Member Functions |
static bool | isETCSupported (bool verbose=false) |
| Reports whether or not ETC (Ericsson Texture Compression) is supported.
|
static void | createTexture (unsigned int width, unsigned int height, GLvoid **textureData) |
| Create a texture using random data.
|
static void | createTexture (unsigned int width, unsigned int height, unsigned int red, GLvoid **textureData) |
| Create a 1 component texture of uniform colour.
|
static void | deleteTextureData (GLvoid **textureData) |
| Deletes previously created texture.
|
static void | loadData (const char *filename, unsigned char **textureData) |
| Load texture data from a file into memory.
|
static void | loadPKMData (const char *filename, ETCHeader *etcHeader, unsigned char **textureData) |
| Load header and texture data from a pkm file into memory.
|
static void | loadCompressedMipmaps (const char *filenameBase, const char *filenameSuffix, GLuint *textureID) |
| Load compressed mipmaps into memory.
|
Static Private Member Functions |
static void | getCompressedTextureFormats (GLint **textureFormats, int *numberOfTextureFormats) |
| Uses glGetIntegerv to get the number of compressed texture formats and the formats themselves.
|
Detailed Description
Functions for working with textures.
Member Function Documentation
void MaliSDK::Texture::createTexture |
( |
unsigned int |
width, |
|
|
unsigned int |
height, |
|
|
GLvoid ** |
textureData |
|
) |
| |
|
static |
Create a texture using random data.
- Parameters:
-
[in] | width | The required width of the texture. |
[in] | height | The required height of the texture. |
[in] | textureData | A pointer to the created texture data. |
void MaliSDK::Texture::createTexture |
( |
unsigned int |
width, |
|
|
unsigned int |
height, |
|
|
unsigned int |
red, |
|
|
GLvoid ** |
textureData |
|
) |
| |
|
static |
Create a 1 component texture of uniform colour.
- Parameters:
-
[in] | width | The required width of the texture. |
[in] | height | The required height of the texture. |
[in] | red | The required red channel. |
[out] | textureData | Output texture. |
void MaliSDK::Texture::deleteTextureData |
( |
GLvoid ** |
textureData | ) |
|
|
static |
Deletes previously created texture.
- Parameters:
-
void MaliSDK::Texture::getCompressedTextureFormats |
( |
GLint ** |
textureFormats, |
|
|
int * |
numberOfTextureFormats |
|
) |
| |
|
staticprivate |
Uses glGetIntegerv to get the number of compressed texture formats and the formats themselves.
Calls glGetIntegerv with GL_NUM_COMPRESSED_TEXTURE_FORMATS and GL_COMPRESSED_TEXTURE_FORMATS.
- Parameters:
-
[out] | textureFormats | Pointer to the array of texture formats. |
[out] | numberOfTextureFormats | Pointer to the number of compressed texture formats. |
static bool MaliSDK::Texture::isETCSupported |
( |
bool |
verbose = false | ) |
|
|
static |
Reports whether or not ETC (Ericsson Texture Compression) is supported.
Uses getCompressedTextureFormats to get the list of supported compression formats and then checks to see if any of them are GL_ETC1_RGB8_OES.
- Parameters:
-
[in] | verbose | If true, prints out the number of supported texture compression formats and then lists the formats supported. |
void MaliSDK::Texture::loadCompressedMipmaps |
( |
const char * |
filenameBase, |
|
|
const char * |
filenameSuffix, |
|
|
GLuint * |
textureID |
|
) |
| |
|
static |
Load compressed mipmaps into memory.
Load the base level, calculate how many Mipmap levels there are. Load the PKM files into memory. Load the data into the texture mipmap levels.
- Parameters:
-
[in] | filenameBase | The base filename of the texture mipmap levels. Will have the mipmap level number appended to it to load all of the mipmap levels. For example, if filenameBase = "texture_", this method will try to load the files "texture_0", "texture_1", "texture_2", etc.. |
[in] | filenameSuffix | Any suffix to the mipmap filenames. Most commonly used for file extensions. For example, if filenameSuffix = ".pkm", this method will append ".pkm" to all the files it tries to load. |
[out] | textureID | The texture ID of the texture that has been loaded. |
void MaliSDK::Texture::loadData |
( |
const char * |
filename, |
|
|
unsigned char ** |
textureData |
|
) |
| |
|
static |
Load texture data from a file into memory.
- Parameters:
-
[in] | filename | The filename of the texture to load. |
[out] | textureData | Pointer to the texture that has been loaded. |
void MaliSDK::Texture::loadPKMData |
( |
const char * |
filename, |
|
|
ETCHeader * |
etcHeader, |
|
|
unsigned char ** |
textureData |
|
) |
| |
|
static |
Load header and texture data from a pkm file into memory.
- Parameters:
-
[in] | filename | The filename of the texture to load. |
[out] | etcHeader | Pointer to the header that has been loaded. |
[out] | textureData | Pointer to the texture that has been loaded. |
The documentation for this class was generated from the following files:
- simple-framework/inc/Texture.h
- simple-framework/src/Texture.cpp