XFcGLComplexSurfaceResource class Reference

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

# XFcGLComplexSurfaceResource Class Reference

Resource for XFcGLTexture object. More...

Inheritance diagram for XFcGLComplexSurfaceResource:

[legend]
Collaboration diagram for XFcGLComplexSurfaceResource:

[legend]
List of all members.

## Public Member Functions

virtual | ~XFcGLComplexSurfaceResource ()
| Virtual destructor.
XFcGLSurface * | lock (INT32 aSurfaceNumber)
| Locks a surface.
INT | unlock (INT32 aSurfaceNumber)
| Unlocks a surface.
INT32 | getSurfaceCount ()
| Returns the surface count.
INT32 | getSurfaceFormat ()
| Returns the surface format (all surfaces must be of the same format).

## Static Public Member Functions

XFcGLComplexSurfaceResource * | create (XFcGLTextureBuilder *aBuilder, INT32 aFlags)
| Creates a XFcGLComplexSurfaceResource object.

## Protected Member Functions

| XFcGLComplexSurfaceResource ()
| Protected constructor.
virtual INT | callback (void *aBuffer)
| Called whenever resource manager needs to re-create the resource.

## Protected Attributes

INT32 | mSurfaces
| Surface count.
INT32 * | mSurfaceOffset
| Surface offsets inside the resource.
XFcGLSurface ** | mSurface
| Pointers to surfaces.
XFcGLTextureBuilder * | mBuilder
| Pointer to parent (used in creation of surface data).
INT32 | mLockCount
| Lock count.
void * | mData
| Data pointer.

## Detailed Description

Resource for XFcGLTexture object.

This class acts as the resource for the XFcGLTexture object. It stores all of the texture's surface data in a single resource. The negative side from this is that if the texture resource is lost, all of the mipmaps will have to be generated whenever the texture is needed next. Positive side is that this dramatically reduces the fragmentation of resource memory, and also speeds up texture finding, as the resource manager does not need to go through N * 8 resources. Swapping between mipmaps inside a single texture is also faster.

See also:
  XFcGLTexture

## Constructor & Destructor Documentation

virtual XFcGLComplexSurfaceResource::~XFcGLComplexSurfaceResource | ( |  | ) | `[virtual]`

| Virtual destructor.

XFcGLComplexSurfaceResource::XFcGLComplexSurfaceResource | ( |  | ) | `[protected]`

| Protected constructor.

## Member Function Documentation

virtual INT XFcGLComplexSurfaceResource::callback | ( | void * | aBuffer | ) | `[protected, virtual]`

| Called whenever resource manager needs to re-create the resource. Reimplemented from XFcResource.

XFcGLComplexSurfaceResource* XFcGLComplexSurfaceResource::create | ( | XFcGLTextureBuilder * | aBuilder,
|  | INT32 | aFlags
| ) | `[static]`

| Creates a XFcGLComplexSurfaceResource object. XFcGLTextureBuilder is queried for surface details.

INT32 XFcGLComplexSurfaceResource::getSurfaceCount | ( |  | ) |

| Returns the surface count.

INT32 XFcGLComplexSurfaceResource::getSurfaceFormat | ( |  | ) |

| Returns the surface format (all surfaces must be of the same format).

XFcGLSurface* XFcGLComplexSurfaceResource::lock | ( | INT32 | aSurfaceNumber | ) |

| Locks a surface.

INT XFcGLComplexSurfaceResource::unlock | ( | INT32 | aSurfaceNumber | ) |

| Unlocks a surface.

## Member Data Documentation

XFcGLTextureBuilder* XFcGLComplexSurfaceResource::mBuilder`[protected]`

| Pointer to parent (used in creation of surface data).

void* XFcGLComplexSurfaceResource::mData`[protected]`

| Data pointer.

INT32 XFcGLComplexSurfaceResource::mLockCount`[protected]`

| Lock count.

XFcGLSurface** XFcGLComplexSurfaceResource::mSurface`[protected]`

| Pointers to surfaces.

INT32* XFcGLComplexSurfaceResource::mSurfaceOffset`[protected]`

| Surface offsets inside the resource.

INT32 XFcGLComplexSurfaceResource::mSurfaces`[protected]`

| Surface count.

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