Torque3D Documentation / _generateds / GFXGLTextureTarget

GFXGLTextureTarget

Engine/source/gfx/gl/gfxGLTextureTarget.h

Render to texture support for OpenGL.

More...

Public User Defined

Functions to query internal state.

Public User Defined

These redirect to our internal implementation.

Public Friends

Protected Attributes

Pointer to our internal implementation.

mTargets [MaxRenderSlotId]

Array of _GFXGLTargetDesc's, an internal struct used to keep track of texture data.

Public Functions

GFXGLTextureTarget(bool genMips)
attachTexture(RenderSlot slot, GFXCubemap * tex, U32 face, U32 mipLevel)

Support binding to cubemaps.

attachTexture(RenderSlot slot, GFXTextureObject * tex, U32 mipLevel, U32 zOffset)

Attach a surface to a given slot as part of this render target.

This is called when the target is not being used anymore.

The resource should put a description of itself (number of vertices, size/width of texture, etc.) in buffer.

Returns the texture format of the render target.

Returns the size in pixels of the render target.

Resolve the current render target data to the associated textures.

Copy this surface to the passed GFXTextureObject.

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

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

Protected Functions

The callback used to get texture events.

Detailed Description

Render to texture support for OpenGL.

This class needs to make a number of assumptions due to the requirements and complexity of render to texture in OpenGL. 1) This class is only guaranteed to work with 2D textures or cubemaps. 3D textures may or may not work. 2) This class does not currently support multiple texture targets. Regardless of how many targets you bind, only Color0 will be used. 3) This class requires that the DepthStencil and Color0 targets have identical dimensions. 4) If the DepthStencil target is GFXTextureTarget::sDefaultStencil, then the Color0 target should be the same size as the current backbuffer and should also be the same format (typically R8G8B8A8)

Public User Defined

getTargetDesc(RenderSlot slot)

Functions to query internal state.

Returns the internal structure for the given slot. This should only be called by our internal implementations.

Public User Defined

applyState()

These redirect to our internal implementation.

makeActive()

Public Friends

Protected Attributes

AutoPtr< _GFXGLTextureTargetImpl > _impl 

Pointer to our internal implementation.

GLuint mCopyFboDst 
GLuint mCopyFboSrc 
AutoPtr< _GFXGLTargetDesc > mTargets [MaxRenderSlotId]

Array of _GFXGLTargetDesc's, an internal struct used to keep track of texture data.

Public Functions

GFXGLTextureTarget(bool genMips)

~GFXGLTextureTarget()

attachTexture(RenderSlot slot, GFXCubemap * tex, U32 face, U32 mipLevel)

Reimplemented from: GFXTextureTarget

attachTexture(RenderSlot slot, GFXTextureObject * tex, U32 mipLevel, U32 zOffset)

Reimplemented from: GFXTextureTarget

clearAttachments()

deactivate()

Reimplemented from: GFXTarget

describeSelf()

Reimplemented from: GFXTarget

getFormat()

Reimplemented from: GFXTarget

getSize()

Reimplemented from: GFXTarget

resolve()

Reimplemented from: GFXTextureTarget

resolveTo(GFXTextureObject * tex)

Reimplemented from: GFXTarget

resurrect()

Reimplemented from: GFXResource

zombify()

Reimplemented from: GFXResource

Protected Functions

_onTextureEvent(GFXTexCallbackCode code)

The callback used to get texture events.