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 * PluginType ()=0
 
virtual const char * PluginDataName ()
 
virtual void WritePluginData (DistiAttributePluginData *)
 
virtual void ReadPluginData (DistiAttributePluginData *)
 
virtual void ResetPluginData ()
 
bool IsPluginType (const char *str)
 
virtual void Destroy ()=0
 Allows plugin to handle destruction of its own data. More...
 

Detailed Description

The TextureLoader class

Member Function Documentation

◆ AddToList()

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

Adds this file importer to a texture loader list

Parameters
listThe texture loader list to add to

◆ FilterDescription()

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

◆ FilterString()

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

◆ GenerateDeclaration()

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

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

◆ GenerateHeader()

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

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

◆ IsFileType()

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.
Parameters
filenameThe file name to check.

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

◆ LoadTexture()

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

◆ PluginType()

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

Implements Plugin.

◆ SupportsExtension()

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

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


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