![]() |
OGRE-Next 4.0.0unstable
Object-Oriented Graphics Rendering Engine
|
#include <OgreCompositorWorkspaceDef.h>
Classes | |
struct | ChannelRoute |
Public Types | |
typedef list< ChannelRoute >::type | ChannelRouteList |
typedef map< IdString, IdString >::type | NodeAliasMap |
![]() | |
typedef vector< BufferDefinition >::type | BufferDefinitionVec |
typedef map< IdString, uint32 >::type | NameToChannelMap |
typedef vector< PixelFormatGpu >::type | PixelFormatGpuVec |
typedef vector< TextureDefinition >::type | TextureDefinitionVec |
enum | TextureSource { TEXTURE_INPUT , TEXTURE_LOCAL , TEXTURE_GLOBAL , NUM_TEXTURES_SOURCES } |
Public Member Functions | |
CompositorWorkspaceDef (const String &name, CompositorManager2 *compositorManager) | |
virtual | ~CompositorWorkspaceDef () |
ChannelRouteList & | _getChannelRoutes () |
Gets direct access to the channel route (aka the interconnections between all of our nodes). | |
void | addNodeAlias (IdString alias, IdString nodeName) |
An alias is explicitly used when the user wants to use multiple, independent instances of the same node. | |
void | clearAll () |
Clears everything: All node aliases, and their connections (including output connection). | |
void | clearAllInterNodeConnections () |
Clears all the connection between channels of the nodes. | |
void | clearOutputConnections () |
Clears the connection from the "final output RenderTarget" (i.e. | |
void | connect (IdString outNode, IdString inNode) |
Connects all outputs channels from outNode to all input channels from inNode. | |
void | connect (IdString outNode, uint32 outChannel, IdString inNode, uint32 inChannel) |
Connects outNode's output channel to inNode's input channel. | |
void | connectBuffer (IdString outNode, IdString inNode) |
Connects all output buffer channels from outNode to all input buffer channels from inNode. | |
void | connectBuffer (IdString outNode, uint32 outChannel, IdString inNode, uint32 inChannel) |
Connects outNode's output buffer channel to inNode's input buffer channel. | |
void | connectExternal (uint32 externalIdx, IdString inNode, uint32 inChannel) |
Connects the (probably "final") node by passing the RenderWindow in the given input channel. | |
void | connectExternalBuffer (uint32 externalBufferIdx, IdString inNode, uint32 inChannel) |
Connects an external buffer to the given input channel. | |
CompositorManager2 * | getCompositorManager () const |
IdString | getName () const |
String | getNameStr () const |
const NodeAliasMap & | getNodeAliasMap () |
Gets read-only access to the map to all added nodes and their aliases. | |
void | removeNodeAlias (IdString alias) |
Removes a particular Node. | |
![]() | |
TextureDefinitionBase (TextureSource defaultSource) | |
TextureDefinition * | _addTextureDefinition (const IdString hashedName) |
For internal use. Don't call this directly. | |
void | _addTextureSourceName (const IdString hashedName, size_t index, TextureSource textureSource) |
For internal use. Don't call this directly. | |
void | addBufferDefinition (IdString name, size_t numElements, uint32 bytesPerElement, uint32 bindFlags, float widthFactor, float heightFactor) |
Creates an UAV buffer. | |
virtual void | addBufferInput (size_t inputChannel, IdString name) |
Buffers. | |
RenderTargetViewDef * | addRenderTextureView (IdString name) |
TextureDefinition * | addTextureDefinition (const String &name) |
Creates a TextureDefinition with a given name, must be unique. | |
virtual IdString | addTextureSourceName (const String &name, size_t index, TextureSource textureSource) |
Adds a texture name, whether a real one or an alias, and where to grab it from. | |
const BufferDefinitionVec & | getLocalBufferDefinitions () const |
BufferDefinitionVec & | getLocalBufferDefinitionsNonConst () |
Returns the local buffer definitions. | |
const TextureDefinitionVec & | getLocalTextureDefinitions () const |
TextureDefinitionVec & | getLocalTextureDefinitionsNonConst () |
Returns the local texture definitions. | |
const NameToChannelMap & | getNameToChannelMap () const |
size_t | getNumInputBufferChannels () const |
size_t | getNumInputChannels () const |
This has O(N) complexity! (not cached, we look in mNameToChannelMap) | |
const RenderTargetViewDef * | getRenderTargetViewDef (IdString name) const |
RenderTargetViewDef * | getRenderTargetViewDefNonConstNoThrow (IdString name) |
void | getTextureSource (IdString name, size_t &index, TextureSource &textureSource) const |
Retrieves in which container to look for when looking to which texture is a given name associated with. | |
void | removeAllRenderTextureViews () |
virtual void | removeBuffer (IdString name) |
Remove a buffer. Buffer can come from an input channel, or a locally defined one. | |
void | removeRenderTextureView (IdString name) |
virtual void | removeTexture (IdString name) |
WARNING: Be very careful with this function. | |
void | renameBuffer (IdString oldName, const String &newName) |
Changes the name of a buffer. | |
void | renameTexture (IdString oldName, const String &newName) |
Changes the name of a texture. | |
void | setNumLocalBufferDefinitions (size_t numTDs) |
Reserves enough memory for all texture definitions. | |
void | setNumLocalTextureDefinitions (size_t numTDs) |
Reserves enough memory for all texture definitions. | |
Additional Inherited Members | |
![]() | |
static UavBufferPacked * | createBuffer (const BufferDefinition &bufferDef, const TextureGpu *finalTarget, VaoManager *vaoManager) |
static void | createBuffers (const BufferDefinitionVec &bufferDefs, CompositorNamedBufferVec &inOutBufContainer, const TextureGpu *finalTarget, RenderSystem *renderSys) |
Utility function to create the buffers based on a given set of buffer definitions and put them in a container. | |
static CompositorChannel | createTexture (const TextureDefinition &textureDef, const String &texName, const TextureGpu *finalTarget, RenderSystem *renderSys) |
static void | createTextures (const TextureDefinitionVec &textureDefs, CompositorChannelVec &inOutTexContainer, IdType id, const TextureGpu *finalTarget, RenderSystem *renderSys) |
Utility function to create the textures based on a given set of texture definitions and put them in a container. | |
static void | decodeTexSource (uint32 encodedVal, size_t &outIdx, TextureSource &outTexSource) |
static void | destroyBuffers (const BufferDefinitionVec &bufferDefs, CompositorNamedBufferVec &inOutBufContainer, RenderSystem *renderSys) |
static void | destroyTextures (CompositorChannelVec &inOutTexContainer, RenderSystem *renderSys) |
static void | recreateResizableBuffers (const BufferDefinitionVec &bufferDefs, CompositorNamedBufferVec &inOutBufContainer, const TextureGpu *finalTarget, RenderSystem *renderSys, const CompositorNodeVec &connectedNodes, const CompositorPassVec *passes) |
Destroys & recreates only the buffers that depend on the main RT (i.e. | |
static void | recreateResizableTextures01 (const TextureDefinitionVec &textureDefs, CompositorChannelVec &inOutTexContainer, const TextureGpu *finalTarget) |
Destroys & recreates only the textures that depend on the main RT (e.g. | |
static void | recreateResizableTextures02 (const TextureDefinitionVec &textureDefs, CompositorChannelVec &inOutTexContainer, const CompositorNodeVec &connectedNodes, const CompositorPassVec *passes) |
See recreateResizableTextures01 Updates involved RenderPassDescriptors. | |
static void | setupTexture (TextureGpu *tex, const TextureDefinition &textureDef, const TextureGpu *finalTarget) |
typedef list<ChannelRoute>::type Ogre::CompositorWorkspaceDef::ChannelRouteList |
typedef map<IdString,IdString>::type Ogre::CompositorWorkspaceDef::NodeAliasMap |
Ogre::CompositorWorkspaceDef::CompositorWorkspaceDef | ( | const String & | name, |
CompositorManager2 * | compositorManager | ||
) |
|
inlinevirtual |
|
inline |
Gets direct access to the channel route (aka the interconnections between all of our nodes).
Useful for advanced C++ users who want fine control of the connections.
An alias is explicitly used when the user wants to use multiple, independent instances of the same node.
Each alias equals one instance. An implicit alias is when the name of the alias and it's node name match.
alias | Name of the alias (instance). May be equal to nodeName. |
nodeName | Name of the node definition |
void Ogre::CompositorWorkspaceDef::clearAll | ( | ) |
Clears everything: All node aliases, and their connections (including output connection).
void Ogre::CompositorWorkspaceDef::clearAllInterNodeConnections | ( | ) |
Clears all the connection between channels of the nodes.
void Ogre::CompositorWorkspaceDef::clearOutputConnections | ( | ) |
Clears the connection from the "final output RenderTarget" (i.e.
usually the RenderWindow) that goes to the input channel of one of our nodes.
Connects all outputs channels from outNode to all input channels from inNode.
If the number of channels don't match, only the first N channels are set (where N is the minimum between outNode's output channels and inNode's input channels).
void Ogre::CompositorWorkspaceDef::connect | ( | IdString | outNode, |
uint32 | outChannel, | ||
IdString | inNode, | ||
uint32 | inChannel | ||
) |
Connects outNode's output channel to inNode's input channel.
Connects all output buffer channels from outNode to all input buffer channels from inNode.
If the number of channels don't match, only the first N channels are set (where N is the minimum between outNode's output channels and inNode's input channels).
void Ogre::CompositorWorkspaceDef::connectBuffer | ( | IdString | outNode, |
uint32 | outChannel, | ||
IdString | inNode, | ||
uint32 | inChannel | ||
) |
Connects outNode's output buffer channel to inNode's input buffer channel.
void Ogre::CompositorWorkspaceDef::connectExternal | ( | uint32 | externalIdx, |
IdString | inNode, | ||
uint32 | inChannel | ||
) |
Connects the (probably "final") node by passing the RenderWindow in the given input channel.
void Ogre::CompositorWorkspaceDef::connectExternalBuffer | ( | uint32 | externalBufferIdx, |
IdString | inNode, | ||
uint32 | inChannel | ||
) |
Connects an external buffer to the given input channel.
|
inline |
|
inline |
|
inline |
|
inline |
Gets read-only access to the map to all added nodes and their aliases.
Useful to know which nodes are in use by this compositor. Use addNodeAlias() removeNodeAlias() and connect() to safely modify the map.
void Ogre::CompositorWorkspaceDef::removeNodeAlias | ( | IdString | alias | ) |
Removes a particular Node.
All of its connections to other node are also removed, which may leave other nodes with its inputs in an incomplete state.