GFXGLCubemap

Engine/source/gfx/gl/gfxGLCubemap.h

More...

Public Friends

class

Protected Attributes

Internal GL handle.

The backing DDSFile uses to restore the faces when the surface is lost.

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

Keep refs to our textures for resurrection of static cubemaps.

Public Functions

Returns the face texture format.

Returns the size of the faces.

U8 *
getTextureData(U32 face, U32 mip)
initDynamic(U32 texSize, GFXFormat faceFormat, U32 mipLevels)

create dynamic cubemap. mipLevels 0 is auto create mips, otherwise the value is how many mip levels you wish the cubemap to have

Create a static cubemap from a DDS cubemap file.

Create a static cubemap from a list of 6 face textures.

bool

Returns if this cubemap has been initialized.

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

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

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

Public Static Functions

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

Protected Functions

The callback used to get texture events.

bind(U32 textureUnit)

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

Copies the textures in faces into the cubemap.

Binds the cubemap to the given texture unit.

Detailed Description

Public Friends

Protected Attributes

GLuint mCubemap 

Internal GL handle.

Resource< DDSFile > mDDSFile 

The backing DDSFile uses to restore the faces when the surface is lost.

U32 mDynamicTexSize 

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

GFXFormat mFaceFormat 
U32 mHeight 
GFXTexHandle mTextures [6]

Keep refs to our textures for resurrection of static cubemaps.

U32 mWidth 

Public Functions

GFXGLCubemap()

~GFXGLCubemap()

getFormat()

Reimplemented from: GFXCubemap

getHandle()

getHeight()

getSize()

Reimplemented from: GFXCubemap

getTextureData(U32 face, U32 mip)

return:

An array containing the texture data

note:

You are responsible for deleting the returned data! (Use delete[])

getWidth()

initDynamic(U32 texSize, GFXFormat faceFormat, U32 mipLevels)

Reimplemented from: GFXCubemap

initStatic(DDSFile * dds)

Reimplemented from: GFXCubemap

initStatic(GFXTexHandle * faces)

Reimplemented from: GFXCubemap

isInitialized()

Reimplemented from: GFXCubemap

resurrect()

Reimplemented from: GFXResource

tmResurrect()

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

zombify()

Reimplemented from: GFXResource

Public Static Functions

getEnumForFaceNumber(U32 face)

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

Protected Functions

_onTextureEvent(GFXTexCallbackCode code)

The callback used to get texture events.

bind(U32 textureUnit)

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

fillCubeTextures(GFXTexHandle * faces)

Copies the textures in faces into the cubemap.

setToTexUnit(U32 tuNum)

Reimplemented from: GFXCubemap