OGRE: Ogre::CompositionPass Class Reference

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::CompositionPass Class Reference
Core » Effects

Object representing one pass or operation in a composition sequence. More...

`#include <OgreCompositionPass.h>`

Inheritance diagram for Ogre::CompositionPass:
[legend]

## Classes
struct | InputTex
| Inputs (for material used for rendering the quad). More...

## Public Types
enum | PassType { PT_CLEAR , PT_STENCIL , PT_RENDERSCENE , PT_RENDERQUAD , PT_RENDERCUSTOM , PT_COMPUTE }
| Enumeration that enumerates the various composition pass types. More...

## Public Member Functions
| CompositionPass (CompositionTargetPass *parent)
| ~CompositionPass ()
bool | _isSupported (void)
| Determine if this target pass is supported on the current rendering device.
void | clearAllInputs ()
| Clear all inputs.
bool | getAlignCameraToFace () const
bool | getAutomaticColour () const
| Retrieves if the clear colour is automatically set to the background colour of the original viewport.
const String & | getCameraName () const
uint32 | getClearBuffers () const
| Get the viewport clear buffers.
const ColourValue & | getClearColour () const
| Get the viewport clear colour (defaults to 0,0,0,0).
float | getClearDepth () const
| Get the viewport clear depth (defaults to 1.0).
uint16 | getClearStencil () const
| Get the viewport clear stencil value (defaults to 0).
const String & | getCustomType () const
| Get the type name of this custom composition pass.
uint8 | getFirstRenderQueue () const
| Get the first render queue to be rendered in this pass (inclusive).
uint32 | getIdentifier () const
| Get the identifier for this pass.
const InputTex & | getInput (size_t id) const
| Get the value of an input.
uint8 | getLastRenderQueue () const
| Get the last render queue to be rendered in this pass (inclusive).
const MaterialPtr & | getMaterial () const
| Get the material used by this pass.
const String & | getMaterialScheme (void) const
| Get the material scheme used by this pass.
size_t | getNumInputs () const
| Get the number of inputs used.
CompositionTargetPass * | getParent ()
| Get parent object.
bool | getQuadCorners (FloatRect &quad) const
| Get quad normalised positions [-1;1]x[-1;1].
bool | getQuadFarCorners () const
| Returns true if camera frustum far corners are provided in the quad.
bool | getQuadFarCornersViewSpace () const
| Returns true if the far corners provided in the quad are in view space.
bool | getStencilCheck () const
| Get stencil check enable.
StencilOperation | getStencilDepthFailOp () const
| Get stencil depth fail operation.
StencilOperation | getStencilFailOp () const
| Get stencil fail operation.
CompareFunction | getStencilFunc () const
| Get stencil compare function.
uint32 | getStencilMask () const
| Get stencil mask.
StencilOperation | getStencilPassOp () const
| Get stencil pass operation.
uint32 | getStencilRefValue () const
| Get stencil reference value.
const StencilState & | getStencilState () const
bool | getStencilTwoSidedOperation () const
| Get two sided stencil operation.
const Vector3i & | getThreadGroups () const
PassType | getType () const
| Get the type of composition pass.
void | setAlignCameraToFace (bool val)
void | setAutomaticColour (bool val)
| Set the clear colour to be the background colour of the original viewport.
void | setCameraName (const String &name)
void | setClearBuffers (uint32 val)
| Would be nice to have for RENDERSCENE: flags to: exclude transparents override material (at least – color).
void | setClearColour (const ColourValue &val)
| Set the viewport clear colour (defaults to 0,0,0,0).
void | setClearDepth (float depth)
| Set the viewport clear depth (defaults to 1.0).
void | setClearStencil (uint16 value)
| Set the viewport clear stencil value (defaults to 0).
void | setCustomType (const String &customType)
| Set the type name of this custom composition pass.
void | setFirstRenderQueue (uint8 id)
| Set the first render queue to be rendered in this pass (inclusive).
void | setIdentifier (uint32 id)
| Set an identifier for this pass.
void | setInput (size_t id, const String &input=BLANKSTRING, size_t mrtIndex=0)
| Set an input local texture.
void | setLastRenderQueue (uint8 id)
| Set the last render queue to be rendered in this pass (inclusive).
void | setMaterial (const MaterialPtr &mat)
| Set the material used by this pass.
void | setMaterialName (const String &name)
| Set the material used by this pass.
void | setMaterialScheme (const String &schemeName)
| Set the material scheme used by this pass.
void | setQuadCorners (const FloatRect &quad)
| Set quad normalised positions [-1;1]x[-1;1].
void | setQuadFarCorners (bool farCorners, bool farCornersViewSpace)
| Sets the use of camera frustum far corners provided in the quad's normals.
void | setStencilCheck (bool value)
| Set stencil check on or off.
void | setStencilDepthFailOp (StencilOperation value)
| Set stencil depth fail operation.
void | setStencilFailOp (StencilOperation value)
| Set stencil fail operation.
void | setStencilFunc (CompareFunction value)
| Set stencil compare function.
void | setStencilMask (uint32 value)
| Set stencil mask.
void | setStencilPassOp (StencilOperation value)
| Set stencil pass operation.
void | setStencilRefValue (uint32 value)
| Set stencil reference value.
void | setStencilTwoSidedOperation (bool value)
| Set two sided stencil operation.
void | setThreadGroups (const Vector3i &g)
void | setType (PassType type)
| Set the type of composition pass.

## Detailed Description

Object representing one pass or operation in a composition sequence.

This provides a method to conveniently interleave RenderSystem commands between Render Queues.

## Member Enumeration Documentation

## ◆ PassType

enum Ogre::CompositionPass::PassType

Enumeration that enumerates the various composition pass types.

Enumerator
PT_CLEAR | Clear target to one colour.
PT_STENCIL | Set stencil operation.
PT_RENDERSCENE | Render the scene or part of it.
PT_RENDERQUAD | Render a full screen quad.
PT_RENDERCUSTOM | Render a custom sequence.
PT_COMPUTE | dispatch a compute shader

## Constructor & Destructor Documentation

## ◆ CompositionPass()

Ogre::CompositionPass::CompositionPass | ( | CompositionTargetPass * | parent | ) |

## ◆ ~CompositionPass()

Ogre::CompositionPass::~CompositionPass | ( |  | ) |

## Member Function Documentation

## ◆ setType()

void Ogre::CompositionPass::setType | ( | PassType | type | ) |

Set the type of composition pass.

## ◆ getType()

PassType Ogre::CompositionPass::getType | ( |  | ) | const

Get the type of composition pass.

## ◆ setIdentifier()

void Ogre::CompositionPass::setIdentifier | ( | uint32 | id | ) |

Set an identifier for this pass.

This identifier can be used to "listen in" on this pass with an CompositorInstance::Listener.

## ◆ getIdentifier()

uint32 Ogre::CompositionPass::getIdentifier | ( |  | ) | const

Get the identifier for this pass.

## ◆ setMaterial()

void Ogre::CompositionPass::setMaterial | ( | const MaterialPtr & | mat | ) |

Set the material used by this pass.

Note
  applies when PassType is RENDERQUAD

## ◆ setMaterialName()

void Ogre::CompositionPass::setMaterialName | ( | const String & | name | ) |

Set the material used by this pass.

Note
  applies when PassType is RENDERQUAD

## ◆ getMaterial()

const MaterialPtr & Ogre::CompositionPass::getMaterial | ( |  | ) | const

Get the material used by this pass.

Note
  applies when PassType is RENDERQUAD

## ◆ setFirstRenderQueue()

void Ogre::CompositionPass::setFirstRenderQueue | ( | uint8 | id | ) |

Set the first render queue to be rendered in this pass (inclusive).

Note
  applies when PassType is RENDERSCENE

## ◆ getFirstRenderQueue()

uint8 Ogre::CompositionPass::getFirstRenderQueue | ( |  | ) | const

Get the first render queue to be rendered in this pass (inclusive).

Note
  applies when PassType is RENDERSCENE

## ◆ setLastRenderQueue()

void Ogre::CompositionPass::setLastRenderQueue | ( | uint8 | id | ) |

Set the last render queue to be rendered in this pass (inclusive).

Note
  applies when PassType is RENDERSCENE

## ◆ getLastRenderQueue()

uint8 Ogre::CompositionPass::getLastRenderQueue | ( |  | ) | const

Get the last render queue to be rendered in this pass (inclusive).

Note
  applies when PassType is RENDERSCENE

## ◆ setMaterialScheme()

void Ogre::CompositionPass::setMaterialScheme | ( | const String & | schemeName | ) |

Set the material scheme used by this pass.

Only applicable to passes that render the scene.

See also
  Technique::setScheme.

## ◆ getMaterialScheme()

const String & Ogre::CompositionPass::getMaterialScheme | ( | void |  | ) | const

Get the material scheme used by this pass.

Only applicable to passes that render the scene.

See also
  Technique::setScheme.

## ◆ setClearBuffers()

void Ogre::CompositionPass::setClearBuffers | ( | uint32 | val | ) |

Would be nice to have for RENDERSCENE: flags to: exclude transparents override material (at least – color).

Set the viewport clear buffers (defaults to FBT_COLOUR|FBT_DEPTH)

Parameters

  val | is a combination of FBT_COLOUR, FBT_DEPTH, FBT_STENCIL.

Note
  applies when PassType is CLEAR

## ◆ getClearBuffers()

uint32 Ogre::CompositionPass::getClearBuffers | ( |  | ) | const

Get the viewport clear buffers.

Note
  applies when PassType is CLEAR

## ◆ setClearColour()

void Ogre::CompositionPass::setClearColour | ( | const ColourValue & | val | ) |

Set the viewport clear colour (defaults to 0,0,0,0).

Note
  applies when PassType is CLEAR

## ◆ getClearColour()

const ColourValue & Ogre::CompositionPass::getClearColour | ( |  | ) | const

Get the viewport clear colour (defaults to 0,0,0,0).

Note
  applies when PassType is CLEAR

## ◆ setAutomaticColour()

void Ogre::CompositionPass::setAutomaticColour | ( | bool | val | ) |

Set the clear colour to be the background colour of the original viewport.

Note
  applies when PassType is CLEAR

## ◆ getAutomaticColour()

bool Ogre::CompositionPass::getAutomaticColour | ( |  | ) | const

Retrieves if the clear colour is automatically set to the background colour of the original viewport.

Note
  applies when PassType is CLEAR

## ◆ setClearDepth()

void Ogre::CompositionPass::setClearDepth | ( | float | depth | ) |

Set the viewport clear depth (defaults to 1.0).

Note
  applies when PassType is CLEAR

## ◆ getClearDepth()

float Ogre::CompositionPass::getClearDepth | ( |  | ) | const

Get the viewport clear depth (defaults to 1.0).

Note
  applies when PassType is CLEAR

## ◆ setClearStencil()

void Ogre::CompositionPass::setClearStencil | ( | uint16 | value | ) |

Set the viewport clear stencil value (defaults to 0).

Note
  applies when PassType is CLEAR

## ◆ getClearStencil()

uint16 Ogre::CompositionPass::getClearStencil | ( |  | ) | const

Get the viewport clear stencil value (defaults to 0).

Note
  applies when PassType is CLEAR

## ◆ setStencilCheck()

void Ogre::CompositionPass::setStencilCheck | ( | bool | value | ) |

Set stencil check on or off.

Note
  applies when PassType is STENCIL

## ◆ getStencilCheck()

bool Ogre::CompositionPass::getStencilCheck | ( |  | ) | const

Get stencil check enable.

Note
  applies when PassType is STENCIL

## ◆ setStencilFunc()

void Ogre::CompositionPass::setStencilFunc | ( | CompareFunction | value | ) |

Set stencil compare function.

Note
  applies when PassType is STENCIL

## ◆ getStencilFunc()

CompareFunction Ogre::CompositionPass::getStencilFunc | ( |  | ) | const

Get stencil compare function.

Note
  applies when PassType is STENCIL

## ◆ setStencilRefValue()

void Ogre::CompositionPass::setStencilRefValue | ( | uint32 | value | ) |

Set stencil reference value.

Note
  applies when PassType is STENCIL

## ◆ getStencilRefValue()

uint32 Ogre::CompositionPass::getStencilRefValue | ( |  | ) | const

Get stencil reference value.

Note
  applies when PassType is STENCIL

## ◆ setStencilMask()

void Ogre::CompositionPass::setStencilMask | ( | uint32 | value | ) |

Set stencil mask.

Note
  applies when PassType is STENCIL

## ◆ getStencilMask()

uint32 Ogre::CompositionPass::getStencilMask | ( |  | ) | const

Get stencil mask.

Note
  applies when PassType is STENCIL

## ◆ setStencilFailOp()

void Ogre::CompositionPass::setStencilFailOp | ( | StencilOperation | value | ) |

Set stencil fail operation.

Note
  applies when PassType is STENCIL

## ◆ getStencilFailOp()

StencilOperation Ogre::CompositionPass::getStencilFailOp | ( |  | ) | const

Get stencil fail operation.

Note
  applies when PassType is STENCIL

## ◆ setStencilDepthFailOp()

void Ogre::CompositionPass::setStencilDepthFailOp | ( | StencilOperation | value | ) |

Set stencil depth fail operation.

Note
  applies when PassType is STENCIL

## ◆ getStencilDepthFailOp()

StencilOperation Ogre::CompositionPass::getStencilDepthFailOp | ( |  | ) | const

Get stencil depth fail operation.

Note
  applies when PassType is STENCIL

## ◆ setStencilPassOp()

void Ogre::CompositionPass::setStencilPassOp | ( | StencilOperation | value | ) |

Set stencil pass operation.

Note
  applies when PassType is STENCIL

## ◆ getStencilPassOp()

StencilOperation Ogre::CompositionPass::getStencilPassOp | ( |  | ) | const

Get stencil pass operation.

Note
  applies when PassType is STENCIL

## ◆ setStencilTwoSidedOperation()

void Ogre::CompositionPass::setStencilTwoSidedOperation | ( | bool | value | ) |

Set two sided stencil operation.

Note
  applies when PassType is STENCIL

## ◆ getStencilTwoSidedOperation()

bool Ogre::CompositionPass::getStencilTwoSidedOperation | ( |  | ) | const

Get two sided stencil operation.

Note
  applies when PassType is STENCIL

## ◆ getStencilState()

const StencilState & Ogre::CompositionPass::getStencilState | ( |  | ) | const
| inline

## ◆ setInput()

void Ogre::CompositionPass::setInput | ( | size_t | id,
|  | const String & | input = BLANKSTRING,
|  | size_t | mrtIndex = 0 )

Set an input local texture.

An empty string clears the input.

Parameters

  id | Input to set. Must be in 0..OGRE_MAX_TEXTURE_LAYERS-1
  input | Which texture to bind to this input. An empty string clears the input.
  mrtIndex | Which surface of an MRT to retrieve

Note
  applies when PassType is RENDERQUAD

References Ogre::BLANKSTRING.

## ◆ getInput()

const InputTex & Ogre::CompositionPass::getInput | ( | size_t | id | ) | const

Get the value of an input.

Parameters

  id | Input to get. Must be in 0..OGRE_MAX_TEXTURE_LAYERS-1.

Note
  applies when PassType is RENDERQUAD

## ◆ getNumInputs()

size_t Ogre::CompositionPass::getNumInputs | ( |  | ) | const

Get the number of inputs used.

Note
  applies when PassType is RENDERQUAD

## ◆ clearAllInputs()

void Ogre::CompositionPass::clearAllInputs | ( |  | ) |

Clear all inputs.

Note
  applies when PassType is RENDERQUAD

## ◆ getParent()

CompositionTargetPass * Ogre::CompositionPass::getParent | ( |  | ) |

Get parent object.

Note
  applies when PassType is RENDERQUAD

## ◆ _isSupported()

bool Ogre::CompositionPass::_isSupported | ( | void |  | ) |

Determine if this target pass is supported on the current rendering device.

## ◆ setQuadCorners()

void Ogre::CompositionPass::setQuadCorners | ( | const FloatRect & | quad | ) |
| inline

Set quad normalised positions [-1;1]x[-1;1].

Note
  applies when PassType is RENDERQUAD

## ◆ getQuadCorners()

bool Ogre::CompositionPass::getQuadCorners | ( | FloatRect & | quad | ) | const
| inline

Get quad normalised positions [-1;1]x[-1;1].

Note
  applies when PassType is RENDERQUAD

## ◆ setQuadFarCorners()

void Ogre::CompositionPass::setQuadFarCorners | ( | bool | farCorners,
|  | bool | farCornersViewSpace )

Sets the use of camera frustum far corners provided in the quad's normals.

Note
  applies when PassType is RENDERQUAD

## ◆ getQuadFarCorners()

bool Ogre::CompositionPass::getQuadFarCorners | ( |  | ) | const

Returns true if camera frustum far corners are provided in the quad.

Note
  applies when PassType is RENDERQUAD

## ◆ getQuadFarCornersViewSpace()

bool Ogre::CompositionPass::getQuadFarCornersViewSpace | ( |  | ) | const

Returns true if the far corners provided in the quad are in view space.

Note
  applies when PassType is RENDERQUAD

## ◆ setCustomType()

void Ogre::CompositionPass::setCustomType | ( | const String & | customType | ) |

Set the type name of this custom composition pass.

Note
  applies when PassType is RENDERCUSTOM

See also
  CompositorManager::registerCustomCompositionPass

## ◆ getCustomType()

const String & Ogre::CompositionPass::getCustomType | ( |  | ) | const

Get the type name of this custom composition pass.

Note
  applies when PassType is RENDERCUSTOM

See also
  CompositorManager::registerCustomCompositionPass

## ◆ setThreadGroups()

void Ogre::CompositionPass::setThreadGroups | ( | const Vector3i & | g | ) |
| inline

## ◆ getThreadGroups()

const Vector3i & Ogre::CompositionPass::getThreadGroups | ( |  | ) | const
| inline

## ◆ setCameraName()

void Ogre::CompositionPass::setCameraName | ( | const String & | name | ) |
| inline

## ◆ getCameraName()

const String & Ogre::CompositionPass::getCameraName | ( |  | ) | const
| inline

## ◆ setAlignCameraToFace()

void Ogre::CompositionPass::setAlignCameraToFace | ( | bool | val | ) |
| inline

## ◆ getAlignCameraToFace()

bool Ogre::CompositionPass::getAlignCameraToFace | ( |  | ) | const
| inline

The documentation for this class was generated from the following file:

- OgreCompositionPass.h