GFXGLCubemap
Engine/source/gfx/gl/gfxGLCubemap.h
Public Friends
class
class
Protected Attributes
Size of faces for a dynamic texture (used in resurrect)
mTextures [6]
Keep refs to our textures for resurrection of static cubemaps.
Public Functions
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
initStatic(DDSFile * dds)
Create a static cubemap from a DDS cubemap file.
initStatic(GFXTexHandle * faces)
Create a static cubemap from a list of 6 face textures.
bool
Returns if this cubemap has been initialized.
Called by texCB; this is to ensure that all textures have been resurrected before we attempt to res the cubemap.
Public Static Functions
getEnumForFaceNumber(U32 face)
Performs lookup to get a GLenum for the given face number.
Protected Functions
The callback used to get texture events.
fillCubeTextures(GFXTexHandle * faces)
Copies the textures in faces into the cubemap.
setToTexUnit(U32 tuNum)
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)
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