OpenGL ES SDK for Android
ARM Developer Center
|
Functions for working with textures. More...
#include <Texture.h>
Static Public Member Functions | |
static bool | isETCSupported (bool verbose=false) |
Reports whether or not ETC (Ericsson Texture Compression) is supported. More... | |
static void | createTexture (unsigned int width, unsigned int height, GLvoid **textureData) |
Create a texture using random data. More... | |
static void | createTexture (unsigned int width, unsigned int height, unsigned int red, GLvoid **textureData) |
Create a 1 component texture of uniform colour. More... | |
static void | createTexture (unsigned int width, unsigned int height, short red, short **textureData) |
Create uniform texture using given color with 1 short integer components. More... | |
static void | deleteTextureData (GLvoid **textureData) |
Deletes previously created texture. More... | |
static void | loadData (const char *filename, unsigned char **textureData) |
Load texture data from a file into memory. More... | |
static void | loadPKMData (const char *filename, ETCHeader *etcHeader, unsigned char **textureData) |
Load header and texture data from a pkm file into memory. More... | |
static void | loadCompressedMipmaps (const char *filenameBase, const char *filenameSuffix, GLuint *textureID) |
Load compressed mipmaps into memory. More... | |
static void | reversePixelLine (float *destination, const float *source, int lineWidth) |
Copies float pixel data of one line of the image from source to destination in the reverse direction. More... | |
static bool | isETCSupported (bool verbose=false) |
Reports whether or not ETC (Ericsson Texture Compression) is supported. More... | |
static void | createTexture (unsigned int width, unsigned int height, GLvoid **textureData) |
Create a texture using random data. More... | |
static void | createTexture (unsigned int width, unsigned int height, unsigned int red, GLvoid **textureData) |
Create a 1 component texture of uniform colour. More... | |
static void | createTexture (unsigned int width, unsigned int height, short red, short **textureData) |
Create uniform texture using given color with 1 short integer components. More... | |
static void | deleteTextureData (GLvoid **textureData) |
Deletes previously created texture. More... | |
static void | loadData (const char *filename, unsigned char **textureData) |
Load texture data from a file into memory. More... | |
static void | loadPKMData (const char *filename, ETCHeader *etcHeader, unsigned char **textureData) |
Load header and texture data from a pkm file into memory. More... | |
static void | reversePixelLine (float *destination, const float *source, int lineWidth) |
Copies float pixel data of one line of the image from source to destination in the reverse direction. More... | |
static void | createTexture (unsigned int width, unsigned int height, GLvoid **textureData) |
Create a texture using random data. More... | |
static void | createTexture (unsigned int width, unsigned int height, unsigned int red, GLvoid **textureData) |
Create a 1 component texture of uniform colour. More... | |
static void | createTexture (unsigned int width, unsigned int height, short red, short **textureData) |
Create uniform texture using given color with 1 short integer components. More... | |
static void | deleteTextureData (GLvoid **textureData) |
Deletes previously created texture. More... | |
static bool | isETCSupported (bool verbose=false) |
Reports whether or not ETC (Ericsson Texture Compression) is supported. More... | |
static void | createTexture (unsigned int width, unsigned int height, GLvoid **textureData) |
Create a texture using random data. More... | |
static void | createTexture (unsigned int width, unsigned int height, unsigned int red, GLvoid **textureData) |
Create a 1 component texture of uniform colour. More... | |
static void | createTexture (unsigned int width, unsigned int height, short red, short **textureData) |
Create uniform texture using given color with 1 short integer components. More... | |
static void | deleteTextureData (GLvoid **textureData) |
Deletes previously created texture. More... | |
static void | loadData (const char *filename, unsigned char **textureData) |
Load texture data from a file into memory. More... | |
static void | reversePixelLine (float *destination, const float *source, int lineWidth) |
Copies float pixel data of one line of the image from source to destination in the reverse direction. More... | |
static bool | isETCSupported (bool verbose=false) |
Reports whether or not ETC (Ericsson Texture Compression) is supported. More... | |
static void | createTexture (unsigned int width, unsigned int height, GLvoid **textureData) |
Create a texture using random data. More... | |
static void | createTexture (unsigned int width, unsigned int height, unsigned int red, GLvoid **textureData) |
Create a 1 component texture of uniform colour. More... | |
static void | createTexture (unsigned int width, unsigned int height, short red, short **textureData) |
Create uniform texture using given color with 1 short integer components. More... | |
static void | deleteTextureData (GLvoid **textureData) |
Deletes previously created texture. More... | |
static void | loadData (const char *filename, unsigned char **textureData) |
Load texture data from a file into memory. More... | |
static void | reversePixelLine (float *destination, const float *source, int lineWidth) |
Copies float pixel data of one line of the image from source to destination in the reverse direction. More... | |
static void | loadBmpImageData (const char *fileName, int *imageWidthPtr, int *imageHeightPtr, unsigned char **textureDataPtrPtr) |
Load BMP texture data from a file into memory. More... | |
static void | loadBmpImageData (const char *fileName, int *imageWidthPtr, int *imageHeightPtr, unsigned char **textureDataPtrPtr) |
Load BMP texture data from a file into memory. More... | |
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. More... | |
static void | getCompressedTextureFormats (GLint **textureFormats, int *numberOfTextureFormats) |
Uses glGetIntegerv to get the number of compressed texture formats and the formats themselves. More... | |
static void | getCompressedTextureFormats (GLint **textureFormats, int *numberOfTextureFormats) |
Uses glGetIntegerv to get the number of compressed texture formats and the formats themselves. More... | |
static void | getCompressedTextureFormats (GLint **textureFormats, int *numberOfTextureFormats) |
Uses glGetIntegerv to get the number of compressed texture formats and the formats themselves. More... | |
static void | readBitmapFileHeader (FILE *filePtr, tagBITMAPFILEHEADER *bitmapFileHeaderPtr) |
Read BMP file header. More... | |
static void | readBitmapInforHeader (FILE *filePtr, tagBITMAPINFOHEADER *bitmapInfoHeaderPtr) |
Read BMP info header. More... | |
static void | readBitmapFileHeader (FILE *filePtr, tagBITMAPFILEHEADER *bitmapFileHeaderPtr) |
Read BMP file header. More... | |
static void | readBitmapInforHeader (FILE *filePtr, tagBITMAPINFOHEADER *bitmapInfoHeaderPtr) |
Read BMP info header. More... | |
|
static |
Create a texture using random data.
[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. |
|
static |
Create a 1 component texture of uniform colour.
[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. |
|
static |
Create a texture using random data.
[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. |
|
static |
Create a texture using random data.
[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. |
|
static |
Create a texture using random data.
[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. |
|
static |
Create uniform texture using given color with 1 short integer components.
[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. |
|
static |
Create a 1 component texture of uniform colour.
[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. |
|
static |
Create a texture using random data.
[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. |
Definition at line 103 of file Texture.cpp.
|
static |
Create a 1 component texture of uniform colour.
[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. |
|
static |
Create a 1 component texture of uniform colour.
[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. |
|
static |
Create uniform texture using given color with 1 short integer components.
[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. |
|
static |
Create a 1 component texture of uniform colour.
[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. |
Definition at line 129 of file Texture.cpp.
|
static |
Create uniform texture using given color with 1 short integer components.
[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. |
|
static |
Create uniform texture using given color with 1 short integer components.
[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. |
|
static |
Create uniform texture using given color with 1 short integer components.
[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. |
Definition at line 146 of file Texture.cpp.
|
static |
Deletes previously created texture.
[in] | textureData | Texture to be deleted. |
|
static |
Deletes previously created texture.
[in] | textureData | Texture to be deleted. |
|
static |
Deletes previously created texture.
[in] | textureData | Texture to be deleted. |
|
static |
Deletes previously created texture.
[in] | textureData | Texture to be deleted. |
|
static |
Deletes previously created texture.
[in] | textureData | Texture to be deleted. |
Definition at line 162 of file Texture.cpp.
|
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.
[out] | textureFormats | Pointer to the array of texture formats. |
[out] | numberOfTextureFormats | Pointer to the number of compressed texture formats. |
|
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.
[out] | textureFormats | Pointer to the array of texture formats. |
[out] | numberOfTextureFormats | Pointer to the number of compressed texture formats. |
|
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.
[out] | textureFormats | Pointer to the array of texture formats. |
[out] | numberOfTextureFormats | Pointer to the number of compressed texture formats. |
|
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.
[out] | textureFormats | Pointer to the array of texture formats. |
[out] | numberOfTextureFormats | Pointer to the number of compressed texture formats. |
Definition at line 38 of file Texture.cpp.
|
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.
[in] | verbose | If true, prints out the number of supported texture compression formats and then lists the formats supported. |
|
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.
[in] | verbose | If true, prints out the number of supported texture compression formats and then lists the formats supported. |
|
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.
[in] | verbose | If true, prints out the number of supported texture compression formats and then lists the formats supported. |
|
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.
[in] | verbose | If true, prints out the number of supported texture compression formats and then lists the formats supported. |
Definition at line 46 of file Texture.cpp.
|
static |
Load BMP texture data from a file into memory.
fileName | The filename of the texture to be loaded. Cannot be NULL. |
imageWidthPtr | Deref will be used to store image width. |
imageHeightPtr | Deref will be used to store image height. |
textureDataPtrPtr | Pointer to a memory where loaded texture data will be stored. Cannot be NULL. |
Definition at line 26 of file Texture.cpp.
|
static |
Load BMP texture data from a file into memory.
fileName | The filename of the texture to be loaded. Cannot be NULL. |
imageWidthPtr | Deref will be used to store image width. |
imageHeightPtr | Deref will be used to store image height. |
textureDataPtrPtr | Pointer to a memory where loaded texture data will be stored. Cannot be NULL. |
|
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.
[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. |
Definition at line 232 of file Texture.cpp.
|
static |
Load texture data from a file into memory.
[in] | filename | The filename of the texture to load. |
[out] | textureData | Pointer to the texture that has been loaded. |
|
static |
Load texture data from a file into memory.
[in] | filename | The filename of the texture to load. |
[out] | textureData | Pointer to the texture that has been loaded. |
|
static |
Load texture data from a file into memory.
[in] | filename | The filename of the texture to load. |
[out] | textureData | Pointer to the texture that has been loaded. |
|
static |
Load texture data from a file into memory.
[in] | filename | The filename of the texture to load. |
[out] | textureData | Pointer to the texture that has been loaded. |
Definition at line 167 of file Texture.cpp.
|
static |
Load header and texture data from a pkm file into memory.
[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. |
|
static |
Load header and texture data from a pkm file into memory.
[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. |
Definition at line 199 of file Texture.cpp.
|
staticprivate |
Read BMP file header.
filePtr | File pointer where BMP file header data is stored. Cannot be NULL. |
bitmapFileHeaderPtr | Deref will be used to store loaded data. Cannot be NULL. |
Definition at line 94 of file Texture.cpp.
|
staticprivate |
Read BMP file header.
filePtr | File pointer where BMP file header data is stored. Cannot be NULL. |
bitmapFileHeaderPtr | Deref will be used to store loaded data. Cannot be NULL. |
|
staticprivate |
Read BMP info header.
filePtr | File pointer where BMP info header data is stored. Cannot be NULL. |
bitmapInfoHeaderPtr | Deref will be used to store loaded data. Cannot be NULL. |
Definition at line 112 of file Texture.cpp.
|
staticprivate |
Read BMP info header.
filePtr | File pointer where BMP info header data is stored. Cannot be NULL. |
bitmapInfoHeaderPtr | Deref will be used to store loaded data. Cannot be NULL. |
|
static |
Copies float pixel data of one line of the image from source to destination in the reverse direction.
[out] | destination | Place in memory where the reversed data will be copied to. Cannot be NULL. |
[in] | source | Place from which the copying should start from. Cannot be NULL. |
[in] | lineWidth | Number of RGB pixels that will be copied. |
|
static |
Copies float pixel data of one line of the image from source to destination in the reverse direction.
[out] | destination | Place in memory where the reversed data will be copied to. Cannot be NULL. |
[in] | source | Place from which the copying should start from. Cannot be NULL. |
[in] | lineWidth | Number of RGB pixels that will be copied. |
|
static |
Copies float pixel data of one line of the image from source to destination in the reverse direction.
[out] | destination | Place in memory where the reversed data will be copied to. Cannot be NULL. |
[in] | source | Place from which the copying should start from. Cannot be NULL. |
[in] | lineWidth | Number of RGB pixels that will be copied. |
|
static |
Copies float pixel data of one line of the image from source to destination in the reverse direction.
[out] | destination | Place in memory where the reversed data will be copied to. Cannot be NULL. |
[in] | source | Place from which the copying should start from. Cannot be NULL. |
[in] | lineWidth | Number of RGB pixels that will be copied. |
Definition at line 318 of file Texture.cpp.