GL Studio C++ Runtime API
TextureLoaderList Class Reference

#include <texture_loader.h>

Inheritance diagram for TextureLoaderList:
List_c

Public Member Functions

 TextureLoaderList ()
 
void InsertObject (TextureLoader *importer)
 
char * FilterString ()
 
ImageLoadTexture (const char *filename, const Image::LoadOptions &options, bool allowNPOT=true)
 
ImageLoadTextureWithOptimization (const char *filename, const Image::LoadOptions &options, const bool optimizeTextureLoad, bool allowNPOT=true)
 
TextureLoaderSupportsExtension (const char *ext)
 
- Public Member Functions inherited from List_c
int IsEmpty ()
 
void Empty ()
 
ListItemFirst ()
 
ListItemLast ()
 
ListItemNth (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 TextureLoaderListInstance ()
 
static void SetOptimizeTextureLoading (const bool enable)
 
static bool IsOptimizeTextureLoading ()
 

Additional Inherited Members

- Protected Attributes inherited from List_c
ListItem_pTail
 

Detailed Description

A list of (pointers to) texture loader objects.

Constructor & Destructor Documentation

A singleton interface

Member Function Documentation

char* FilterString ( )

Creates and returns a file filter string for all of the file types that have been registered by Texture Loaders

Returns
Filter string
void InsertObject ( TextureLoader importer)

Insert the loader into the list at the specified location

Parameters
importer
static TextureLoaderList* Instance ( )
static

A singleton interface

Returns
A pointer to the one and only instance
static bool IsOptimizeTextureLoading ( )
static

determine if texture loading optimization is enabled

Returns
true if enabled else false
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.

Parameters
filenameThe file to load the image from
optionsOptions to load the image with
allowNPOTIf the image is allowed to be non-power of two (NPOT)
Returns
NULL if the file type isn't supported or if loading fails
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.

Parameters
filenameThe file to load the image from
optionsOptions to load the image with
optimizeTextureLoadtrue to attempt loading optimization else false to force a load
allowNPOTIf the image is allowed to be non-power of two (NPOT)
Returns
NULL if the file type isn't supported or if loading fails
static void SetOptimizeTextureLoading ( const bool  enable)
static

enable / disable texture loading optimization (defaults to enabled)

Parameters
enabletrue to enable else false
TextureLoader* SupportsExtension ( const char *  ext)

Finds the registered texture loader, if any, that supports the given file extension.

Parameters
extThe (case insensitive) file extension
Returns
A pointer to the registered loader, or NULL if no loader exists

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