GL Studio C++ Runtime API
|
#include <texture_loader.h>
Public Member Functions | |
TextureLoaderList () | |
void | InsertObject (TextureLoader *importer) |
char * | FilterString () |
Image * | LoadTexture (const char *filename, const Image::LoadOptions &options, bool allowNPOT=true) |
Image * | LoadTextureWithOptimization (const char *filename, const Image::LoadOptions &options, const bool optimizeTextureLoad, bool allowNPOT=true) |
TextureLoader * | SupportsExtension (const char *ext) |
Public Member Functions inherited from List_c | |
int | IsEmpty () |
void | Empty () |
ListItem * | First () |
ListItem * | Last () |
ListItem * | Nth (int where) |
void | InsertAfter (int where, const void *data, int size, void **parentPtr) |
void | InsertAfter (ListItem *after, const void *data, int size, void **parentPtr) |
void | InsertAfter (ListItem *after, ListItem *pNewNode) |
void | InsertBefore (ListItem *before, ListItem *pNewNode) |
void | Push (const void *data, int size, void **parentPtr) |
void | Push (const void *data, int size) |
void | Push (ListItem *pNewNode) |
void | Enqueue (const void *data, int size, void **parentPtr) |
void | Enqueue (const void *data, int size) |
void | Enqueue (ListItem *pNewNode) |
void * | Dequeue () |
void * | GetElement (int where) |
int | Count () |
void | Delete (ListItem *element) |
void | AddNodeWithPriority (ListItem *pNewNode, int priority) |
void | AddNodeWithPriority (const void *data, int size, int priority) |
void | ForwardIterator (ListIterator func, void *data=NULL) |
void | BackwardIterator (ListIterator func, void *data=NULL) |
void | Iterator (ListIterator func, void *data, ListIteratorDirection direction) |
Static Public Member Functions | |
static TextureLoaderList * | Instance () |
static void | SetOptimizeTextureLoading (const bool enable) |
static bool | IsOptimizeTextureLoading () |
Additional Inherited Members | |
Protected Attributes inherited from List_c | |
ListItem * | _pTail |
A list of (pointers to) texture loader objects.
A singleton interface
char* FilterString | ( | ) |
Creates and returns a file filter string for all of the file types that have been registered by Texture Loaders
void InsertObject | ( | TextureLoader * | importer | ) |
Insert the loader into the list at the specified location
importer |
|
static |
A singleton interface
|
static |
determine if texture loading optimization is enabled
Image* LoadTexture | ( | const char * | filename, |
const Image::LoadOptions & | options, | ||
bool | allowNPOT = true |
||
) |
Load the specified texture file. Try all loaders to see if any of them support the given file type.
filename | The file to load the image from |
options | Options to load the image with |
allowNPOT | If the image is allowed to be non-power of two (NPOT) |
Image* LoadTextureWithOptimization | ( | const char * | filename, |
const Image::LoadOptions & | options, | ||
const bool | optimizeTextureLoad, | ||
bool | allowNPOT = true |
||
) |
Load the specified texture file optionally attempting to optimize the load by looking at previously loaded images. Try all loaders to see if any of them support the given file type.
filename | The file to load the image from |
options | Options to load the image with |
optimizeTextureLoad | true to attempt loading optimization else false to force a load |
allowNPOT | If the image is allowed to be non-power of two (NPOT) |
|
static |
enable / disable texture loading optimization (defaults to enabled)
enable | true to enable else false |
TextureLoader* SupportsExtension | ( | const char * | ext | ) |
Finds the registered texture loader, if any, that supports the given file extension.
ext | The (case insensitive) file extension |