A compositor workspace is the main interface to render into an RT, be it a RenderWindow or an RTT (Render Texture Target).
More...
|
| CompositorWorkspace (IdType id, const CompositorWorkspaceDef *definition, const CompositorChannelVec &externalRenderTargets, SceneManager *sceneManager, Camera *defaultCam, RenderSystem *renderSys, bool bEnabled, uint8 executionMask, uint8 viewportModifierMask, const Vector4 &vpOffsetScale, const UavBufferPackedVec *uavBuffers, const ResourceStatusMap *initialLayouts) |
|
virtual | ~CompositorWorkspace () |
|
void | _beginUpdate (bool forceBeginFrame, const bool bInsideAutoreleasePool=false) |
| Call before _update() unless the final render target is not a render window. More...
|
|
void | _endUpdate (bool forceEndFrame, const bool bInsideAutoreleasePool=false) |
| Call after _update() unless the final render target is not a render window. More...
|
|
void | _notifyBarriersDirty () |
|
void | _swapFinalTarget (vector< TextureGpu * >::type &swappedTargets) |
| In the case of RenderWindows, swaps/copies/flips the front with the back buffer. More...
|
|
void | _update (const bool bInsideAutoreleasePool=false) |
| Updates the workspace's nodes. More...
|
|
void | _validateFinalTarget () |
| For compatibility with D3D9, forces a device lost check on the RenderWindow, so that BeginScene doesn't fail. More...
|
|
void | addListener (CompositorWorkspaceListener *listener) |
|
void | fillPassesUsingRenderWindows (PassesByRenderWindowMap &passesUsingRenderWindows) |
| Fills the input map + vector with all the passes that use a window, classified per window. More...
|
|
Camera * | findCamera (IdString cameraName) const |
| Finds a camera in the scene manager we have. More...
|
|
CompositorNode * | findNode (IdString aliasName, bool includeShadowNodes=false) const |
| Finds a node instance with the given aliased name. More...
|
|
CompositorNode * | findNodeNoThrow (IdString aliasName, bool includeShadowNodes=false) const |
|
CompositorShadowNode * | findOrCreateShadowNode (IdString nodeDefName, bool &bCreated) |
| Finds a shadow node given its definition name. More...
|
|
CompositorShadowNode * | findShadowNode (IdString nodeDefName) const |
| Finds a shadow node instance with a given name. More...
|
|
bool | getAmalgamatedProfiling () const |
|
CompositorManager2 * | getCompositorManager () |
| Gets the compositor manager (non const) More...
|
|
const CompositorManager2 * | getCompositorManager () const |
| Gets the compositor manager (const version) More...
|
|
Camera * | getDefaultCamera () const |
| Gets the default camera passed through mDefaultViewport. More...
|
|
const CompositorWorkspaceDef * | getDefinition () |
|
bool | getEnabled () const |
|
uint8 | getExecutionMask () const |
|
const CompositorChannelVec & | getExternalRenderTargets () const |
| Usually by convention the RenderTarget[0] is the one we're rendering to. May be empty. More...
|
|
TextureGpu * | getFinalTarget () const |
| Returns the RenderTarget we're rendering to. More...
|
|
size_t | getFrameCount () const |
|
const CompositorNamedBufferVec & | getGlobalBuffers () const |
|
const CompositorChannel & | getGlobalTexture (IdString name) const |
|
CompositorWorkspaceListener * | getListener () const |
|
const CompositorWorkspaceListenerVec & | getListeners () const |
|
const CompositorNodeVec & | getNodeSequence () const |
|
SceneManager * | getSceneManager () const |
|
const Vector4 & | getViewportModifier () const |
|
uint8 | getViewportModifierMask () const |
|
bool | isValid () const |
| Only valid workspaces can update without crashing. More...
|
|
void | reconnectAllNodes () |
| Reconnects all nodes. More...
|
|
void | recreateAllNodes () |
| Destroys and recreates all nodes. More...
|
|
void | removeListener (CompositorWorkspaceListener *listener) |
|
void | resetAllNumPassesLeft () |
| Resets the number of passes left for every pass (see CompositorPassDef::mNumInitialPasses) Useful when you have a few starting 'initialization' passes and you want to reset them. More...
|
|
void | setAmalgamatedProfiling (bool bEnabled) |
| When building with OGRE_PROFILING enabled, setting this option to true will cause the profiler to collapse all per-pass profiling information into one group. More...
|
|
void | setEnabled (bool bEnabled) |
|
void | setExecutionMask (uint8 executionMask) |
|
void | setListener (CompositorWorkspaceListener *listener) |
|
void | setViewportModifier (const Vector4 &modifier) |
|
void | setViewportModifierMask (uint8 mask) |
|
| IdObject (IdType id) |
| We don't call generateNewId() here, to prevent objects in the stack (i.e. More...
|
|
IdType | getId () const |
| Get the unique id of this object. More...
|
|
bool | operator() (const IdObject &left, const IdObject &right) |
|
bool | operator() (const IdObject *left, const IdObject *right) |
|
A compositor workspace is the main interface to render into an RT, be it a RenderWindow or an RTT (Render Texture Target).
Whereas Ogre 1.x needed you to set a Viewport in order to render to an RTT or RW and then call renderTarget->update, now you need to set a workspace definition instead and call workspace->_update().
- Compositors are not just a "fancy effects" system anymore, they tell Ogre how you want to render the scene. You can't render to an RT without setting a compositor!
- A workspace may be instantiated multiple times for different RTs, or using different cameras (i.e. multiple monitors, stereo 3D, etc), while they all will share the same definition. A workspace definition (see CompositorWorkspaceDef) contains all the information needed by this CompositorWorkspace to instantiate and know which nodes to create and how to connect them. (See CompositorNodeDef) A workspace may define global textures that are visible to all of its Node instances.
- If you want to have (e.g.) two monitors rendering the same but with different compositor effects, you will also have to create two different definitions (CompositorWorkspaceDefs)
- The intention of Ogre 2.0's compositor is to ideally have one Workspace per monitor (or per eye) while handling all RTTs inside that workspace with compositor nodes, local and global textures (including manually updated stuff like procedural textures, terrain's auto generated normal maps, etc); but it is also possible to do things the 1.x way: use additional Workspaces for manually rendering and controlling RTTs.
- Users with basic needs (no advanced effects) can see CompositorManager2::createBasicWorkspaceDef for quickly having a basic definition set for them.
- For more information about Compositors, consult the Ogre 2.0 Porting Manual in the Docs folder.
- Author
- Matias N. Goldberg
- Version
- 1.1