GL Studio API
Public Member Functions | List of all members
TextureLoader Class Referenceabstract

#include <texture_loader.h>

Inheritance diagram for TextureLoader:
Plugin BmpImageLoader DDSImageLoader GifImageLoader JpegImageLoader PngImageLoader PsdImageLoader RgbImageLoader TgaImageLoader TiffImageLoader XpmImageLoader

Public Member Functions

virtual const char * FilterString ()=0
 
virtual const char * FilterDescription ()=0
 
virtual const char * GenerateHeader ()=0
 
virtual const char * GenerateDeclaration ()=0
 
virtual const char * PluginType ()
 
virtual bool IsFileType (const char *filename)=0
 
virtual bool SupportsExtension (const char *ext)=0
 
virtual ImageLoadTexture (const char *filename, const Image::LoadOptions &options, bool allowNPOT=true)=0
 
void AddToList (TextureLoaderList *list=TextureLoaderList::Instance())
 
- Public Member Functions inherited from Plugin
virtual const char * Description (void)=0
 
virtual const char * Version (void)=0
 
virtual const char * PluginDataName ()
 
virtual void WritePluginData (DistiAttributePluginData *)
 
virtual void ReadPluginData (DistiAttributePluginData *)
 
virtual void ResetPluginData ()
 
bool IsPluginType (const char *str)
 

Detailed Description

The TextureLoader class

Member Function Documentation

void AddToList ( TextureLoaderList list = TextureLoaderList::Instance())

Adds this file importer to a texture loader list

Parameters
listThe texture loader list to add to
virtual const char* FilterDescription ( )
pure virtual
Returns
A filter string description that is used by the windows FileBrowser to build the list of files to display in the browser

Implemented in JpegImageLoader, PngImageLoader, BmpImageLoader, DDSImageLoader, RgbImageLoader, TgaImageLoader, XpmImageLoader, GifImageLoader, PsdImageLoader, and TiffImageLoader.

virtual const char* FilterString ( )
pure virtual
Returns
A filter string that is used by the windows FileBrowser to build the list of files to display in the browser

Implemented in JpegImageLoader, PngImageLoader, BmpImageLoader, DDSImageLoader, RgbImageLoader, TgaImageLoader, XpmImageLoader, GifImageLoader, PsdImageLoader, and TiffImageLoader.

virtual const char* GenerateDeclaration ( )
pure virtual
Returns
The string to be generated to generate an instance of this object

Implemented in PngImageLoader, DDSImageLoader, RgbImageLoader, TgaImageLoader, XpmImageLoader, BmpImageLoader, GifImageLoader, PsdImageLoader, TiffImageLoader, and JpegImageLoader.

virtual const char* GenerateHeader ( )
pure virtual
Returns
The name of the header file to include when generating code for this plugin

Implemented in PngImageLoader, DDSImageLoader, RgbImageLoader, TgaImageLoader, XpmImageLoader, BmpImageLoader, GifImageLoader, PsdImageLoader, TiffImageLoader, and JpegImageLoader.

virtual bool IsFileType ( const char *  filename)
pure virtual
Returns
TRUE if the file pointer appears to contain an image that can be loaded by this class. This method must close the file if it returns TRUE. It must rewind the file if it returns FALSE

Implemented in PngImageLoader, DDSImageLoader, RgbImageLoader, TgaImageLoader, XpmImageLoader, JpegImageLoader, TiffImageLoader, BmpImageLoader, GifImageLoader, and PsdImageLoader.

virtual Image* LoadTexture ( const char *  filename,
const Image::LoadOptions options,
bool  allowNPOT = true 
)
pure virtual

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

Implemented in PngImageLoader, DDSImageLoader, RgbImageLoader, TgaImageLoader, XpmImageLoader, JpegImageLoader, TiffImageLoader, BmpImageLoader, GifImageLoader, and PsdImageLoader.

virtual const char* PluginType ( )
virtual
Returns
The type of plugin

Implements Plugin.

virtual bool SupportsExtension ( const char *  ext)
pure virtual
Returns
TRUE if the class can load files with the given extension.

Implemented in PngImageLoader, DDSImageLoader, RgbImageLoader, TgaImageLoader, XpmImageLoader, BmpImageLoader, GifImageLoader, JpegImageLoader, PsdImageLoader, and TiffImageLoader.


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