GFXTarget

Engine/source/gfx/gfxTarget.h

Base class for a target to which GFX can render.

More...

Protected Functions

Called whenever a change is made to this target.

Called when the device has applied pending state.

Public Functions

Constructor to initialize the state tracking logic.

This is called to set the 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.

const bool

Called to check if we have pending state for the device to apply.

This tells the target that the contents of this target should be restored when activate() is next called.

Copy this surface to the passed GFXTextureObject.

Detailed Description

Base class for a target to which GFX can render.

Most modern graphics hardware supports selecting render targets. However, there may be multiple types of render target, with wildly varying device-level implementations, resource requirements, and so forth.

This base class is used to represent a render target; it might be a context tied to a window, or a set of surfaces or textures.

Private Attributes

S32 mChangeToken 
S32 mLastAppliedChange 

Protected Functions

invalidateState()

Called whenever a change is made to this target.

stateApplied()

Called when the device has applied pending state.

Public Functions

GFXTarget()

Constructor to initialize the state tracking logic.

~GFXTarget()

activate()

This is called to set the render target.

Reimplemented by: GFXD3D11TextureTarget, GFXD3D11WindowTarget

deactivate()

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

Reimplemented by: GFXD3D11TextureTarget, GFXGLTextureTarget

describeSelf()

Reimplemented from: GFXResource

Reimplemented by: GFXGLTextureTarget

getFormat()

Returns the texture format of the render target.

Reimplemented by: GFXD3D11TextureTarget, GFXD3D11WindowTarget, GFXGLTextureTarget, GFXGLWindowTarget, GFXNullWindowTarget

getSize()

Returns the size in pixels of the render target.

Reimplemented by: GFXD3D11TextureTarget, GFXD3D11WindowTarget, GFXGLTextureTarget, GFXGLWindowTarget, GFXNullWindowTarget

isPendingState()

Called to check if we have pending state for the device to apply.

preserve()

This tells the target that the contents of this target should be restored when activate() is next called.

resolveTo(GFXTextureObject * tex)

Copy this surface to the passed GFXTextureObject.


Parameters:

tex

The GFXTextureObject to copy to.

Reimplemented by: GFXGLTextureTarget, GFXGLWindowTarget, GFXD3D11TextureTarget, GFXD3D11WindowTarget