GFXGLCubemap Class Reference

#include <gfxGLCubemap.h>

Inheritance diagram for GFXGLCubemap:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 GFXGLCubemap ()
virtual ~GFXGLCubemap ()
virtual void initStatic (GFXTexHandle *faces)
virtual void initDynamic (U32 texSize)
U32 getWidth ()
U32 getHeight ()
U32 getNumMipLevels ()
U32 getHandle ()
virtual void zombify ()
 When called the resource should destroy all device sensitive information (e.g. D3D resources in D3DPOOL_DEFAULT.
virtual void resurrect ()
 When called the resource should restore all device sensitive information destroyed by zombify().
void tmResurrect ()
 Called by texCB; this is to ensure that all textures have been resurrected before we attempt to res the cubemap.

Static Public Member Functions

static GLenum getEnumForFaceNumber (U32 face)
 Performs lookup to get a GLenum for the given face number.
static void texCB (GFXTexCallbackCode code, void *userData)
 Texture callback method.

Private Member Functions

virtual void setToTexUnit (U32 tuNum)
 Binds the cubemap to the given texture unit.
virtual void bind (U32 textureUnit) const
 Notifies our owning device that we want to be set to the given texture unit (used for GL internal state tracking).
void fillCubeTextures (GFXTexHandle *faces)
 Copies the textures in faces into the cubemap.

Private Attributes

GLuint mCubemap
 Internal GL handle.
U32 mDynamicTexSize
 Size of faces for a dynamic texture (used in resurrect).
U32 mWidth
U32 mHeight
U32 mMipLevels
S32 mTexCallbackHandle
 Used to unregister our texture callback on delete.
GFXTexHandle mTextures [6]
 Keep refs to our textures for resurrection of static cubemaps.

Static Private Attributes

static GLenum faceList [6]
 Lookup table.

Friends

class GFXDevice
class GFXGLDevice

Constructor & Destructor Documentation

GFXGLCubemap::GFXGLCubemap (  ) 

virtual GFXGLCubemap::~GFXGLCubemap (  )  [virtual]


Member Function Documentation

virtual void GFXGLCubemap::initStatic ( GFXTexHandle faces  )  [virtual]

Implements GFXCubemap.

virtual void GFXGLCubemap::initDynamic ( U32  texSize  )  [virtual]

Implements GFXCubemap.

U32 GFXGLCubemap::getWidth (  )  [inline]

U32 GFXGLCubemap::getHeight (  )  [inline]

U32 GFXGLCubemap::getNumMipLevels (  )  [inline]

U32 GFXGLCubemap::getHandle (  )  [inline]

virtual void GFXGLCubemap::zombify (  )  [virtual]

When called the resource should destroy all device sensitive information (e.g. D3D resources in D3DPOOL_DEFAULT.

Implements GFXResource.

virtual void GFXGLCubemap::resurrect (  )  [virtual]

When called the resource should restore all device sensitive information destroyed by zombify().

Implements GFXResource.

void GFXGLCubemap::tmResurrect (  ) 

Called by texCB; this is to ensure that all textures have been resurrected before we attempt to res the cubemap.

static GLenum GFXGLCubemap::getEnumForFaceNumber ( U32  face  )  [inline, static]

Performs lookup to get a GLenum for the given face number.

static void GFXGLCubemap::texCB ( GFXTexCallbackCode  code,
void userData 
) [static]

Texture callback method.

Parameters:
userData The cubemap which needs to be dealt with.

virtual void GFXGLCubemap::setToTexUnit ( U32  tuNum  )  [private, virtual]

Binds the cubemap to the given texture unit.

Implements GFXCubemap.

virtual void GFXGLCubemap::bind ( U32  textureUnit  )  const [private, virtual]

Notifies our owning device that we want to be set to the given texture unit (used for GL internal state tracking).

void GFXGLCubemap::fillCubeTextures ( GFXTexHandle faces  )  [private]

Copies the textures in faces into the cubemap.


Friends And Related Function Documentation

friend class GFXDevice [friend]

Reimplemented from GFXCubemap.

friend class GFXGLDevice [friend]


Member Data Documentation

Internal GL handle.

Size of faces for a dynamic texture (used in resurrect).

Used to unregister our texture callback on delete.

Keep refs to our textures for resurrection of static cubemaps.

GLenum GFXGLCubemap::faceList[6] [static, private]

Lookup table.