XFcGLTextureBuilder class Reference

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

# XFcGLTextureBuilder Class Reference

Interface for a texture builder which creates texture surfaces as needed. More...

Inheritance diagram for XFcGLTextureBuilder:

[legend]
List of all members.

## Public Member Functions

virtual XFCIMPORT INT32 | getSurfaceCount ()=0
| Returns the number of surfaces required for this texture.
virtual XFCIMPORT void | getSurfaceParams (INT32 aSurfaceNumber, INT32 &aWidth, INT32 &aHeight, INT32 &aFormat)=0
| Called for each surface to return the parameters for the surface.
virtual XFCIMPORT INT | fillSurface (INT32 aSurfaceNumber, void *aBuffer, XFcGLComplexSurfaceResource *aComplexSurfaceResource)=0
| Called in order to fill the surfaces as needed.
virtual XFCIMPORT | ~XFcGLTextureBuilder ()
| Virtual destructor.
XFCIMPORT INT | equals (XFcGLTextureBuilder *aBuilder)
| Compares two XFcGLTextureBuilder classes.
virtual XFCIMPORT INT | sameClassEquals (XFcGLTextureBuilder *aBuilder)=0
| Compares two XFcGLTextureBuilder-extended objects of the same class.

## Public Attributes

UINT32 | mBuilderUniqueId
| Used by equals() function to see if the classes are the same.
UINT32 | mFlags
| Used by equals() function to see if flags are the same.

## Detailed Description

Interface for a texture builder which creates texture surfaces as needed.

A texture builder object contains all information required to create the surfaces for the texture as needed. Since the resource manager may decide to discard the surface data whenever free memory is required, the texture builder will need to recreate the surface data when needed.

See also:
  XFcGLTexture

## Constructor & Destructor Documentation

virtual XFCIMPORT XFcGLTextureBuilder::~XFcGLTextureBuilder | ( |  | ) | `[virtual]`

| Virtual destructor.

## Member Function Documentation

XFCIMPORT INT XFcGLTextureBuilder::equals | ( | XFcGLTextureBuilder * | aBuilder | ) |

Compares two XFcGLTextureBuilder classes.

See also:
  sameClassEquals

Parameters:

  aBuilder | texture builder to compare this builder against.

Returns:
  non-zero if the builders are considered equal, or 0 if they are not equal.

virtual XFCIMPORT INT XFcGLTextureBuilder::fillSurface | ( | INT32 | aSurfaceNumber,
|  | void * | aBuffer,
|  | XFcGLComplexSurfaceResource * | aComplexSurfaceResource
| ) | `[pure virtual]`

Called in order to fill the surfaces as needed.

Parameters:

  aSurfaceNumber | surface number to fill in.
  aBuffer | destination pointer to fill the data in.
  aComplexSurfaceResource | pointer to the complex surface resource for surface.

Returns:
  1 if successful, or 0 if unsuccessful.

Implemented in XFcGLTextureFromFile.

virtual XFCIMPORT INT32 XFcGLTextureBuilder::getSurfaceCount | ( |  | ) | `[pure virtual]`

Returns the number of surfaces required for this texture.

See also:
  sameClassEquals

Implemented in XFcGLTextureFromFile.

virtual XFCIMPORT void XFcGLTextureBuilder::getSurfaceParams | ( | INT32 | aSurfaceNumber,
|  | INT32 & | aWidth,
|  | INT32 & | aHeight,
|  | INT32 & | aFormat
| ) | `[pure virtual]`

Called for each surface to return the parameters for the surface.

Parameters:

  aSurfaceNumber | number of the surface to get the parameters for.
  aWidth | returned width of the surface.
  aHeight | returned height of the surface.
  aFormat | returned format of the surface, see XFCGFXFORMAT.

See also:
  XFCGFXFORMAT

Implemented in XFcGLTextureFromFile.

virtual XFCIMPORT INT XFcGLTextureBuilder::sameClassEquals | ( | XFcGLTextureBuilder * | aBuilder | ) | `[pure virtual]`

Compares two XFcGLTextureBuilder-extended objects of the same class.

The texture loading mechanism attempts to share resources between objects as much as possible, so that, for example, if an application loads a single texture from file several times, it is only allocated once (except if XFCTC_UNIQUE flag is used while creating the texture).

Parameters:

  aBuilder | texture builder to compare this builder against.

Returns:
  non-zero if the builders are considered equal, or 0 if they are not equal.

Implemented in XFcGLTextureFromFile.

## Member Data Documentation

UINT32 XFcGLTextureBuilder::mBuilderUniqueId

Used by equals() function to see if the classes are the same.

See also:
  sameClassEquals

UINT32 XFcGLTextureBuilder::mFlags

Used by equals() function to see if flags are the same.

See also:
  sameClassEquals

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