![]() |
OGRE-Next 4.0.0unstable
Object-Oriented Graphics Rendering Engine
|
Compositor nodes are the core subject of compositing. More...
#include <OgreCompositorNodeDef.h>
Public Member Functions | |
CompositorNodeDef (const String &name, CompositorManager2 *compositorManager) | |
virtual | ~CompositorNodeDef () |
CompositorTargetDef * | addTargetPass (const String &renderTargetName, uint32 rtIndex=0) |
Adds a new Target pass. | |
size_t | calculateNumPasses () const |
Calculates the total number of passes in this node. | |
CompositorManager2 * | getCompositorManager () const |
IdString | getName () const |
String | getNameStr () const |
size_t | getNumOutputChannels () const |
Returns the number of output channels. | |
size_t | getNumTargetPasses () const |
Gets the number of target passes in this node. | |
size_t | getPassNumber (const CompositorPassDef *passDef) const |
Returns the pass # of the given pass definition in this node. | |
bool | getStartEnabled () const |
CompositorTargetDef * | getTargetPass (size_t passIndex) |
Retrieves an existing pass by it's given index. | |
const CompositorTargetDef * | getTargetPass (size_t passIndex) const |
void | getTextureSource (IdString name, size_t &index, TextureSource &textureSource) const |
See http://www.research.att.com/~bs/bs_faq2.html#overloadderived. | |
void | getTextureSource (size_t outputChannel, size_t &index, TextureSource &textureSource) const |
Retrieves in which container to look for when wanting to know the output texture using the mappings from input/local texture -> output. | |
void | mapOutputBufferChannel (size_t outChannel, IdString bufferName) |
Maps the output channel to the given buffer name which can be either a local buffer or a reference to an input channel. | |
void | mapOutputChannel (size_t outChannel, IdString textureName) |
Maps the output channel to the given texture name, which can be either a local texture or a reference to an input channel. | |
virtual void | postInitializePassDef (CompositorPassDef *passDef) |
Called right after we create a pass definition. | |
void | removeTexture (IdString name) override |
WARNING: Be very careful with this function. | |
void | setNumOutputBufferChannels (size_t numOuts) |
Reserves enough memory for all output channel mappings (efficient allocation, better than using linked lists or other containers with two level of indirections) | |
void | setNumOutputChannels (size_t numOuts) |
Reserves enough memory for all output channel mappings (efficient allocation, better than using linked lists or other containers with two level of indirections) | |
void | setNumTargetPass (size_t numPasses) |
Reserves enough memory for all passes. | |
void | setStartEnabled (bool enabled) |
Whether the node should be start as enabled when instantiated. | |
![]() | |
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) |
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. | |
Public Attributes | |
IdString | mCustomIdentifier |
Additional Inherited Members | |
![]() | |
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 } |
![]() | |
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) |
Compositor nodes are the core subject of compositing.
|
inline |
|
inlinevirtual |
CompositorTargetDef * Ogre::CompositorNodeDef::addTargetPass | ( | const String & | renderTargetName, |
uint32 | rtIndex = 0 |
||
) |
Adds a new Target pass.
renderTargetName | We need the full name, not just the hash; so we can check whether it has the global_ prefix |
rtIndex | The RT to address if it is intended to use with a 3D texture (or a cubemap or a 2D Array) See CompositorPassDef::mRtIndex. Default: 0 |
size_t Ogre::CompositorNodeDef::calculateNumPasses | ( | ) | const |
Calculates the total number of passes in this node.
|
inline |
|
inline |
|
inline |
|
inline |
Returns the number of output channels.
|
inline |
Gets the number of target passes in this node.
size_t Ogre::CompositorNodeDef::getPassNumber | ( | const CompositorPassDef * | passDef | ) | const |
Returns the pass # of the given pass definition in this node.
This operation is O(N). Useful for debug output.
passDef | The pass definition to look for |
|
inline |
|
inline |
Retrieves an existing pass by it's given index.
|
inline |
void Ogre::TextureDefinitionBase::getTextureSource | ( | IdString | name, |
size_t & | index, | ||
TextureSource & | textureSource | ||
) | const |
void Ogre::CompositorNodeDef::getTextureSource | ( | size_t | outputChannel, |
size_t & | index, | ||
TextureSource & | textureSource | ||
) | const |
Retrieves in which container to look for when wanting to know the output texture using the mappings from input/local texture -> output.
outputChannel | [in] The output channel we want to know about |
index | [out] The index at the container in which the texture associated with the output channel is stored |
textureSource | [out] Where to get this texture from |
void Ogre::CompositorNodeDef::mapOutputBufferChannel | ( | size_t | outChannel, |
IdString | bufferName | ||
) |
Maps the output channel to the given buffer name which can be either a local buffer or a reference to an input channel.
Global buffers can't be used as output.
outChannel | Output channel # to map |
bufferName | Name of the buffer |
void Ogre::CompositorNodeDef::mapOutputChannel | ( | size_t | outChannel, |
IdString | textureName | ||
) |
Maps the output channel to the given texture name, which can be either a local texture or a reference to an input channel.
Global textures can't be used as output.
outChannel | Output channel # to map |
textureName | Name of the texture, which can be to a local texture, or an input channel's name. Global textures aren't supported. |
|
inlinevirtual |
Called right after we create a pass definition.
Derived classes may want to do something with it
passDef | Newly created pass to toy with. |
Reimplemented in Ogre::CompositorShadowNodeDef.
|
overridevirtual |
WARNING: Be very careful with this function.
Removes a texture.
name | Name of the texture to remove. |
Reimplemented from Ogre::TextureDefinitionBase.
|
inline |
Reserves enough memory for all output channel mappings (efficient allocation, better than using linked lists or other containers with two level of indirections)
numOuts | The number of output buffer channels expected to contain. |
|
inline |
Reserves enough memory for all output channel mappings (efficient allocation, better than using linked lists or other containers with two level of indirections)
numOuts | The number of output channels expected to contain. |
|
inline |
Reserves enough memory for all passes.
numPasses | The number of passes expected to contain. |
|
inline |
Whether the node should be start as enabled when instantiated.
IdString Ogre::CompositorNodeDef::mCustomIdentifier |