Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XFcGLTextureFromFile Class Reference

Create XFcTexture object from an image file. More...

Inheritance diagram for XFcGLTextureFromFile:

Inheritance graph
[legend]
Collaboration diagram for XFcGLTextureFromFile:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual XFCIMPORT INT fillSurface (INT32 aSurfaceNumber, void *aBuffer, XFcGLComplexSurfaceResource *aSurface)
 Inherited from XFcGLTextureBuilder interface.

virtual XFCIMPORT INT32 getSurfaceCount ()
 Inherited from XFcGLTextureBuilder interface.

virtual XFCIMPORT void getSurfaceParams (INT32 aSurfaceNumber, INT32 &aWidth, INT32 &aHeight, INT32 &aFormat)
 Inherited from XFcGLTextureBuilder interface.

virtual XFCIMPORT INT sameClassEquals (XFcGLTextureBuilder *aBuilder)
 Inherited from XFcGLTextureBuilder interface.

virtual XFCIMPORT ~XFcGLTextureFromFile ()
 Virtual destructor.


Static Public Member Functions

XFCIMPORT XFcGLTexturecreate (const CHAR *aFilename, INT32 aFlags=XFCTC_MIPMAP_POINTSAMPLE, UINT32 aColorKey=0xff000000)
 Creates a texture object from an image file.

XFCEXPORT void loadTextureInfo (XFcGLTextureFromFile *aBuilder)
 Loads the texture info for the texture builder.


Protected Member Functions

 XFcGLTextureFromFile ()
 Protected constructor.


Protected Attributes

UINT32 mFormat
 Internal: image format.

CHARmFilename
 Internal: image filename.

UINT32 mWidth
 Internal: image width.

UINT32 mHeight
 Internal: image height.

INT32 mSurfaces
 Internal: total number of surfaces.

INT32 mTextureFormat
 Internal: texture format (XFCGF_R5G5A1B5 or XFCGF_R5G5X1B5).

UINT32 mColorKey
 Internal: color key, if any.


Detailed Description

Create XFcTexture object from an image file.


Constructor & Destructor Documentation

virtual XFCIMPORT XFcGLTextureFromFile::~XFcGLTextureFromFile   [virtual]
 

Virtual destructor.

XFcGLTextureFromFile::XFcGLTextureFromFile   [protected]
 

Protected constructor.


Member Function Documentation

XFCIMPORT XFcGLTexture* XFcGLTextureFromFile::create const CHAR   aFilename,
INT32    aFlags = XFCTC_MIPMAP_POINTSAMPLE,
UINT32    aColorKey = 0xff000000
[static]
 

Creates a texture object from an image file.

In order to use the color key, set the aColorKey parameter and use the XFCTC_COLORKEY flag. The color keying sets the texture format to 1555 and sets all the texels that have the color as transparent.

Internally, the create() function creates a XFcGLTextureFromFile object and passes itself to XFcTexture's create function.
Parameters:
aFilename filename to load the image from.
aFlags texture creation flags, see XFCTEXTURECREATE.
aColorKey color key to use if XFCTC_COLORKEY flag is used.
Returns:
new texture object, or NULL if unsuccessful.
See also:
XFCTEXTURECREATE

virtual XFCIMPORT INT XFcGLTextureFromFile::fillSurface INT32    aSurfaceNumber,
void *    aBuffer,
XFcGLComplexSurfaceResource   aSurface
[virtual]
 

Inherited from XFcGLTextureBuilder interface.

See also:
XFcGLTextureBuilder::fillSurface

Implements XFcGLTextureBuilder.

virtual XFCIMPORT INT32 XFcGLTextureFromFile::getSurfaceCount   [virtual]
 

Inherited from XFcGLTextureBuilder interface.

See also:
XFcGLTextureBuilder::getSurfaceCount

Implements XFcGLTextureBuilder.

virtual XFCIMPORT void XFcGLTextureFromFile::getSurfaceParams INT32    aSurfaceNumber,
INT32   aWidth,
INT32   aHeight,
INT32   aFormat
[virtual]
 

Inherited from XFcGLTextureBuilder interface.

See also:
XFcGLTextureBuilder::getSurfaceParams

Implements XFcGLTextureBuilder.

XFCEXPORT void XFcGLTextureFromFile::loadTextureInfo XFcGLTextureFromFile *    aBuilder [static]
 

Loads the texture info for the texture builder.

virtual XFCIMPORT INT XFcGLTextureFromFile::sameClassEquals XFcGLTextureBuilder   aBuilder [virtual]
 

Inherited from XFcGLTextureBuilder interface.

See also:
XFcGLTextureBuilder::sameClassEquals

Implements XFcGLTextureBuilder.


Member Data Documentation

UINT32 XFcGLTextureFromFile::mColorKey [protected]
 

Internal: color key, if any.

CHAR* XFcGLTextureFromFile::mFilename [protected]
 

Internal: image filename.

UINT32 XFcGLTextureFromFile::mFormat [protected]
 

Internal: image format.

UINT32 XFcGLTextureFromFile::mHeight [protected]
 

Internal: image height.

INT32 XFcGLTextureFromFile::mSurfaces [protected]
 

Internal: total number of surfaces.

INT32 XFcGLTextureFromFile::mTextureFormat [protected]
 

Internal: texture format (XFCGF_R5G5A1B5 or XFCGF_R5G5X1B5).

UINT32 XFcGLTextureFromFile::mWidth [protected]
 

Internal: image width.


   
X-Forge Documentation
Confidential
Copyright © 2002-2003 Fathammer
   
Documentation generated
with doxygen
by Dimitri van Heesch