GL Studio C++ Runtime API
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 ~Plugin ()
 For Polymorphic deletion.
 
virtual const char * Description ()=0
 
virtual const char * Version ()=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, BmpImageLoader, PngImageLoader, DDSImageLoader, GifImageLoader, PsdImageLoader, RgbImageLoader, TgaImageLoader, TiffImageLoader, and XpmImageLoader.

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, BmpImageLoader, PngImageLoader, DDSImageLoader, GifImageLoader, PsdImageLoader, RgbImageLoader, TgaImageLoader, TiffImageLoader, and XpmImageLoader.

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

Implemented in PngImageLoader, BmpImageLoader, DDSImageLoader, GifImageLoader, PsdImageLoader, RgbImageLoader, TgaImageLoader, TiffImageLoader, XpmImageLoader, 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, BmpImageLoader, DDSImageLoader, GifImageLoader, PsdImageLoader, RgbImageLoader, TgaImageLoader, TiffImageLoader, XpmImageLoader, 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, JpegImageLoader, RgbImageLoader, TgaImageLoader, TiffImageLoader, XpmImageLoader, 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, JpegImageLoader, RgbImageLoader, TgaImageLoader, TiffImageLoader, XpmImageLoader, 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, BmpImageLoader, DDSImageLoader, GifImageLoader, JpegImageLoader, PsdImageLoader, RgbImageLoader, TgaImageLoader, TiffImageLoader, and XpmImageLoader.


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