OGRE-Next  2.3
Object-Oriented Graphics Rendering Engine
Ogre::CompositorWorkspaceDef Class Reference

@See CompositorWorkspace. More...

#include <OgreCompositorWorkspaceDef.h>

+ Inheritance diagram for Ogre::CompositorWorkspaceDef:

Classes

struct  ChannelRoute
 

Public Types

typedef vector< BufferDefinition >::type BufferDefinitionVec
 
typedef list< ChannelRoute >::type ChannelRouteList
 
typedef map< IdString, IdString >::type NodeAliasMap
 
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). More...
 
void addBufferDefinition (IdString name, size_t numElements, uint32 bytesPerElement, uint32 bindFlags, float widthFactor, float heightFactor)
 Creates an UAV buffer. More...
 
virtual void addBufferInput (size_t inputChannel, IdString name)
 Buffers. More...
 
void addNodeAlias (IdString alias, IdString nodeName)
 An alias is explicitly used when the user wants to use multiple, independent instances of the same node. More...
 
RenderTargetViewDefaddRenderTextureView (IdString name)
 
TextureDefinitionaddTextureDefinition (const String &name)
 Creates a TextureDefinition with a given name, must be unique. More...
 
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. More...
 
void clearAll ()
 Clears everything: All node aliases, and their connections (including output connection). More...
 
void clearAllInterNodeConnections ()
 Clears all the connection between channels of the nodes (. More...
 
void clearOutputConnections ()
 Clears the connection from the "final output RenderTarget" (i.e. More...
 
void connect (IdString outNode, IdString inNode)
 Connects all outputs channels from outNode to all input channels from inNode. More...
 
void connect (IdString outNode, uint32 outChannel, IdString inNode, uint32 inChannel)
 Connects outNode's output channel to inNode's input channel. More...
 
void connectBuffer (IdString outNode, IdString inNode)
 Connects all output buffer channels from outNode to all input buffer channels from inNode. More...
 
void connectBuffer (IdString outNode, uint32 outChannel, IdString inNode, uint32 inChannel)
 Connects outNode's output buffer channel to inNode's input buffer channel. More...
 
void connectExternal (uint32 externalIdx, IdString inNode, uint32 inChannel)
 Connects the (probably "final") node by passing the RenderWindow in the given input channel. More...
 
void connectExternalBuffer (uint32 externalBufferIdx, IdString inNode, uint32 inChannel)
 Connects an external buffer to the given input channel. More...
 
CompositorManager2getCompositorManager () const
 
const BufferDefinitionVecgetLocalBufferDefinitions () const
 
BufferDefinitionVecgetLocalBufferDefinitionsNonConst ()
 Returns the local buffer definitions. More...
 
const TextureDefinitionVecgetLocalTextureDefinitions () const
 
TextureDefinitionVecgetLocalTextureDefinitionsNonConst ()
 Returns the local texture definitions. More...
 
IdString getName () const
 
String getNameStr () const
 
const NameToChannelMap & getNameToChannelMap () const
 
const NodeAliasMapgetNodeAliasMap ()
 Gets read-only access to the map to all added nodes and their aliases. More...
 
size_t getNumInputBufferChannels () const
 
size_t getNumInputChannels () const
 This has O(N) complexity! (not cached, we look in mNameToChannelMap) More...
 
const RenderTargetViewDefgetRenderTargetViewDef (IdString name) const
 
RenderTargetViewDefgetRenderTargetViewDefNonConstNoThrow (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. More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete (void *ptr, void *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void removeAllRenderTextureViews ()
 
virtual void removeBuffer (IdString name)
 Remove a buffer. Buffer can come from an input channel, or a locally defined one. More...
 
void removeNodeAlias (IdString alias)
 Removes a particular Node. More...
 
void removeRenderTextureView (IdString name)
 
virtual void removeTexture (IdString name)
 WARNING: Be very careful with this function. More...
 
void renameBuffer (IdString oldName, const String &newName)
 Changes the name of a buffer. More...
 
void renameTexture (IdString oldName, const String &newName)
 Changes the name of a texture. More...
 
void setNumLocalBufferDefinitions (size_t numTDs)
 Reserves enough memory for all texture definitions. More...
 
void setNumLocalTextureDefinitions (size_t numTDs)
 Reserves enough memory for all texture definitions. More...
 

Static Public Member Functions

static UavBufferPackedcreateBuffer (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. More...
 
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. More...
 
static void destroyBuffers (const BufferDefinitionVec &bufferDefs, CompositorNamedBufferVec &inOutBufContainer, RenderSystem *renderSys)
 
static void destroyTextures (CompositorChannelVec &inOutTexContainer, RenderSystem *renderSys)
 @See createTextures More...
 
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. More...
 
static void recreateResizableTextures01 (const TextureDefinitionVec &textureDefs, CompositorChannelVec &inOutTexContainer, const TextureGpu *finalTarget)
 Destroys & recreates only the textures that depend on the main RT (e.g. More...
 
static void recreateResizableTextures02 (const TextureDefinitionVec &textureDefs, CompositorChannelVec &inOutTexContainer, const CompositorNodeVec &connectedNodes, const CompositorPassVec *passes)
 See recreateResizableTextures01 Updates involved RenderPassDescriptors. More...
 
static void setupTexture (TextureGpu *tex, const TextureDefinition &textureDef, const TextureGpu *finalTarget)
 

Friends

class CompositorWorkspace
 

Detailed Description

@See CompositorWorkspace.

Workspace definitions assume all other definitions are already parsed as we need them to perform validation checks. Workspace definitions work by assigning aliases to each node. A node whose name is the same as its alias is called an implicit alias.

Remarks
Aliasing nodes allows having more than one instance of the same node.
Author
Matias N. Goldberg
Version
1.1

Member Typedef Documentation

◆ BufferDefinitionVec

◆ ChannelRouteList

◆ NodeAliasMap

◆ PixelFormatGpuVec

◆ TextureDefinitionVec

Member Enumeration Documentation

◆ TextureSource

Enumerator
TEXTURE_INPUT 
TEXTURE_LOCAL 

We got the texture through an input channel.

TEXTURE_GLOBAL 

We own the texture.

NUM_TEXTURES_SOURCES 

It's a global texture. Ask the manager for it.

Constructor & Destructor Documentation

◆ CompositorWorkspaceDef()

Ogre::CompositorWorkspaceDef::CompositorWorkspaceDef ( const String name,
CompositorManager2 compositorManager 
)

◆ ~CompositorWorkspaceDef()

virtual Ogre::CompositorWorkspaceDef::~CompositorWorkspaceDef ( )
inlinevirtual

Member Function Documentation

◆ _getChannelRoutes()

ChannelRouteList& Ogre::CompositorWorkspaceDef::_getChannelRoutes ( )
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.

Remarks
Incorrect manipulation of the channel routes can lead to glitches or crashes. Remember:
  1. Two nodes can't connect to the same node alias on the same channel
  2. Don't reference a node or alias that isn't in mAliasedNodes by the time the Workspace is instantiated
  3. A node that doesn't have all of its input channels connected is incomplete and should be disabled for the Workspace instance to be valid.

◆ addBufferDefinition()

void Ogre::TextureDefinitionBase::addBufferDefinition ( IdString  name,
size_t  numElements,
uint32  bytesPerElement,
uint32  bindFlags,
float  widthFactor,
float  heightFactor 
)
inherited

Creates an UAV buffer.

Parameters
nameName to give to this buffer for referencing it locally from this scope. Duplicate names (including names from addBufferInput) will raise an exception when trying to instantiate the workspace.
bindFlagsBitmask.
See also
BufferBindFlags
Parameters
widthFactor
See also
BufferDefinition::widthFactor
Parameters
heightFactor
See also
BufferDefinition::widthFactor

◆ addBufferInput()

virtual void Ogre::TextureDefinitionBase::addBufferInput ( size_t  inputChannel,
IdString  name 
)
virtualinherited

Buffers.

Specifies that buffer incoming from channel 'inputChannel' will be referenced by the name 'name'

Remarks
Don't leave gaps. (i.e. set channel 0 & 2, without setting channel 1) It's ok to map them out of order (i.e. set channel 2, then 0, then 1)
Parameters
inputChannelInput channel # the buffer comes from.
nameName to give to this buffer for referencing it locally from this scope. Duplicate names (including names from addBufferDefinition) will raise an exception when trying to instantiate the workspace.

Reimplemented in Ogre::CompositorShadowNodeDef.

◆ addNodeAlias()

void Ogre::CompositorWorkspaceDef::addNodeAlias ( IdString  alias,
IdString  nodeName 
)

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.

Remarks
When the name of the node and its alias are the same, it is said to be called an "implicit" alias. This function will throw if trying the alias is already taken by a node definition (except for implicit aliases) This function will throw if the alias is already in use.
Parameters
aliasName of the alias (instance). May be equal to nodeName.
nodeNameName of the node definition

◆ addRenderTextureView()

RenderTargetViewDef* Ogre::TextureDefinitionBase::addRenderTextureView ( IdString  name)
inherited

◆ addTextureDefinition()

TextureDefinition* Ogre::TextureDefinitionBase::addTextureDefinition ( const String name)
inherited

Creates a TextureDefinition with a given name, must be unique.

Remarks
WARNING: Calling this function may invalidate all previous returned pointers unless you've properly called setLocalTextureDefinitions
@See addTextureSourceName remarks for what it can throw
Textures are local when the derived class is a Node definition, and it's global when the derived class is a Workspace definition
Parameters
nameThe name of the texture. Names are usually valid only throughout this node. We need the name, not its hash because we need to validate the global_ prefix is used correctly.

◆ addTextureSourceName()

virtual IdString Ogre::TextureDefinitionBase::addTextureSourceName ( const String name,
size_t  index,
TextureSource  textureSource 
)
virtualinherited

Adds a texture name, whether a real one or an alias, and where to grab it from.

Remarks
Throws if a texture with same name already exists, or if the name makes improper usage of the 'global' prefix.
This is a generic way to add input channels, by calling:
addTextureSourceName( "myRT", 0, TextureDefinitionBase::TEXTURE_INPUT );
You're assigning an alias named "myRT" to channel Input #0 For local or global textures, the index parameter documentation
Parameters
fullNameThe name of the texture. Names are usually valid only throughout this node. We need the name, not its hash because we need to validate the global_ prefix is used correctly.
indexIndex in the container where the texture is located, eg. this->mLocalTextureDefs[index] for local textures, workspace->mLocalTextureDefs[index] for global textures, and this->mInTextures[index] for input channels.
textureSourceSource where the index must be used (eg. TEXTURE_LOCAL means mLocalTextureDefs)
Returns
IdString of the fullName paremeter, for convenience

Reimplemented in Ogre::CompositorShadowNodeDef.

◆ clearAll()

void Ogre::CompositorWorkspaceDef::clearAll ( )

Clears everything: All node aliases, and their connections (including output connection).

Remarks
This function shouldn't be called while there are still instantiated workspaces It is safe to call this function while there are still workspaces, but you must call @Workspace::recreateAllNodes after you're done setting the new node connections.

◆ clearAllInterNodeConnections()

void Ogre::CompositorWorkspaceDef::clearAllInterNodeConnections ( )

Clears all the connection between channels of the nodes (.

See also
connect).
Remarks
  1. We don't clear the output connection (
See also
connectOutput,
clearOutputConnections)
  1. The node aliases (both implicit and explicit) will still exist. @See clearAll.
  2. A node with incomplete inputs should be disabled before the workspace is instantiated (
CompositorNodeDef::setStartEnabled). If the workspace has already been instantiated, the node instance should be disabled,
CompositorNode::setEnabled)
  1. It is safe to call this function while there are still workspaces, but you must call @Workspace::reconnectAllNodes after you're done setting the new node connections

◆ clearOutputConnections()

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. @See connectOutput.

Remarks
  1. We don't clear other type of connections (
See also
connect,
clearAllInterNodeConnections)
  1. The node aliases (both implicit and explicit) will still exist. @See clearAll.
  2. A node with incomplete inputs should be disabled before the workspace is instantiated (
CompositorNodeDef::setStartEnabled). If the workspace has already been instantiated, the node instance should be disabled,
CompositorNode::setEnabled)
  1. It is safe to call this function while there are still workspaces, but you must call @Workspace::reconnectAllNodes after you're done setting the new node connections

◆ connect() [1/2]

void Ogre::CompositorWorkspaceDef::connect ( IdString  outNode,
IdString  inNode 
)

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).

Remarks
If outNode & inNode are not yet aliased, an alias for them will be created.

◆ connect() [2/2]

void Ogre::CompositorWorkspaceDef::connect ( IdString  outNode,
uint32  outChannel,
IdString  inNode,
uint32  inChannel 
)

Connects outNode's output channel to inNode's input channel.

Remarks
This mapping will later be used to know how connections should be done when instantiating. @See CompositorNode::connectTo If outNode & inNode are not yet aliased, an alias for them will be created.

◆ connectBuffer() [1/2]

void Ogre::CompositorWorkspaceDef::connectBuffer ( IdString  outNode,
IdString  inNode 
)

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).

Remarks
If outNode & inNode are not yet aliased, an alias for them will be created.

◆ connectBuffer() [2/2]

void Ogre::CompositorWorkspaceDef::connectBuffer ( IdString  outNode,
uint32  outChannel,
IdString  inNode,
uint32  inChannel 
)

Connects outNode's output buffer channel to inNode's input buffer channel.

Remarks
This mapping will later be used to know how connections should be done when instantiating. @See CompositorNode::connectBufferTo If outNode & inNode are not yet aliased, an alias for them will be created.

◆ connectExternal()

void Ogre::CompositorWorkspaceDef::connectExternal ( uint32  externalIdx,
IdString  inNode,
uint32  inChannel 
)

Connects the (probably "final") node by passing the RenderWindow in the given input channel.

Remarks
See also
connect inNode is not yet aliased, an implicit alias will be created.

◆ connectExternalBuffer()

void Ogre::CompositorWorkspaceDef::connectExternalBuffer ( uint32  externalBufferIdx,
IdString  inNode,
uint32  inChannel 
)

Connects an external buffer to the given input channel.

Remarks
If inNode is not yet aliased, an implicit alias will be created.

◆ createBuffer()

static UavBufferPacked* Ogre::TextureDefinitionBase::createBuffer ( const BufferDefinition bufferDef,
const TextureGpu finalTarget,
VaoManager vaoManager 
)
staticinherited

◆ createBuffers()

static void Ogre::TextureDefinitionBase::createBuffers ( const BufferDefinitionVec bufferDefs,
CompositorNamedBufferVec inOutBufContainer,
const TextureGpu finalTarget,
RenderSystem renderSys 
)
staticinherited

Utility function to create the buffers based on a given set of buffer definitions and put them in a container.

Remarks
Useful because both Workspace & CompositorNode share the same functionality (create global/local buffers respectively) without having to create a whole base class just for one function. It's confusing that Nodes & Workspace would share the same base class, as if they were the same base object or share similar functionality (when in fact, workspace manages nodes)

◆ createTexture()

static CompositorChannel Ogre::TextureDefinitionBase::createTexture ( const TextureDefinition textureDef,
const String texName,
const TextureGpu finalTarget,
RenderSystem renderSys 
)
staticinherited

◆ createTextures()

static void Ogre::TextureDefinitionBase::createTextures ( const TextureDefinitionVec textureDefs,
CompositorChannelVec inOutTexContainer,
IdType  id,
const TextureGpu finalTarget,
RenderSystem renderSys 
)
staticinherited

Utility function to create the textures based on a given set of texture definitions and put them in a container.

Remarks
Useful because both Workspace & CompositorNode share the same functionality (create global/local textures respectively) without having to create a whole base class just for one function. It's confusing that Nodes & Workspace would share the same base class, as if they were the same base object or share similar functionality (when in fact, workspace manages nodes)
Parameters
textureDefsArray of texture definitions
inOutTexContainerWhere we'll store the newly created RTs & textures
idUnique id in the case we want textures to have unique names (uniqueNames must be true)
uniqueNamesSet to true if each RT will have a unique name based on given Id, or we don't. The latter is useful for global textures (let them get access through materials)
finalTargetThe final render target (usually the render window) we have to clone parameters from (eg. when using auto width & height, or fsaa settings)
renderSysThe RenderSystem to use

◆ destroyBuffers()

static void Ogre::TextureDefinitionBase::destroyBuffers ( const BufferDefinitionVec bufferDefs,
CompositorNamedBufferVec inOutBufContainer,
RenderSystem renderSys 
)
staticinherited
See also
createBuffers We need the definition because, unlike textures, the container passed in may contain textures that were not created by us (i.e. global & input textures) that we shouldn't delete. It is illegal for two buffers to have the same name, so it's invalid that a e.g. an input and a local texture would share the same name.

◆ destroyTextures()

static void Ogre::TextureDefinitionBase::destroyTextures ( CompositorChannelVec inOutTexContainer,
RenderSystem renderSys 
)
staticinherited

@See createTextures

◆ getCompositorManager()

CompositorManager2* Ogre::CompositorWorkspaceDef::getCompositorManager ( ) const
inline

◆ getLocalBufferDefinitions()

const BufferDefinitionVec& Ogre::TextureDefinitionBase::getLocalBufferDefinitions ( ) const
inlineinherited

◆ getLocalBufferDefinitionsNonConst()

BufferDefinitionVec& Ogre::TextureDefinitionBase::getLocalBufferDefinitionsNonConst ( )
inlineinherited

Returns the local buffer definitions.

Remarks
WARNING: Use with care. You should not add/remove elements or change the name
See also
addBufferDefinition,
removeBuffer and
renameBuffer to perform these actions

◆ getLocalTextureDefinitions()

const TextureDefinitionVec& Ogre::TextureDefinitionBase::getLocalTextureDefinitions ( ) const
inlineinherited

◆ getLocalTextureDefinitionsNonConst()

TextureDefinitionVec& Ogre::TextureDefinitionBase::getLocalTextureDefinitionsNonConst ( )
inlineinherited

Returns the local texture definitions.

Remarks
WARNING: Use with care. You should not add/remove elements or change the name as mNameToChannelMap needs to be kept in sync.
See also
addTextureDefinition,
removeTexture and
renameTexture to perform these actions

◆ getName()

IdString Ogre::CompositorWorkspaceDef::getName ( ) const
inline

◆ getNameStr()

String Ogre::CompositorWorkspaceDef::getNameStr ( ) const
inline

◆ getNameToChannelMap()

const NameToChannelMap& Ogre::TextureDefinitionBase::getNameToChannelMap ( ) const
inlineinherited

◆ getNodeAliasMap()

const NodeAliasMap& Ogre::CompositorWorkspaceDef::getNodeAliasMap ( )
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.

◆ getNumInputBufferChannels()

size_t Ogre::TextureDefinitionBase::getNumInputBufferChannels ( ) const
inherited

◆ getNumInputChannels()

size_t Ogre::TextureDefinitionBase::getNumInputChannels ( ) const
inherited

This has O(N) complexity! (not cached, we look in mNameToChannelMap)

◆ getRenderTargetViewDef()

const RenderTargetViewDef* Ogre::TextureDefinitionBase::getRenderTargetViewDef ( IdString  name) const
inherited

◆ getRenderTargetViewDefNonConstNoThrow()

RenderTargetViewDef* Ogre::TextureDefinitionBase::getRenderTargetViewDefNonConstNoThrow ( IdString  name)
inherited

◆ getTextureSource()

void Ogre::TextureDefinitionBase::getTextureSource ( IdString  name,
size_t &  index,
TextureSource textureSource 
) const
inherited

Retrieves in which container to look for when looking to which texture is a given name associated with.

Remarks
Throws if name is not found.
Parameters
nameThe name of the texture. Names are usually valid only throughout this node.
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

◆ operator delete() [1/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

◆ operator delete() [2/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

◆ operator delete[]() [1/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

◆ operator delete[]() [2/2]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

◆ operator new() [1/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

◆ operator new() [2/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [3/3]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

◆ operator new[]() [1/2]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

◆ operator new[]() [2/2]

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

◆ recreateResizableBuffers()

static void Ogre::TextureDefinitionBase::recreateResizableBuffers ( const BufferDefinitionVec bufferDefs,
CompositorNamedBufferVec inOutBufContainer,
const TextureGpu finalTarget,
RenderSystem renderSys,
const CompositorNodeVec connectedNodes,
const CompositorPassVec passes 
)
staticinherited

Destroys & recreates only the buffers that depend on the main RT (i.e.

the RenderWindow) resolution

Parameters
textureDefsArray of texture definitions, so we know which ones depend on main RT's resolution
inOutTexContainerWhere we'll replace the RTs & textures
finalTargetThe final render target (usually the render window) we have to clone parameters from (eg. when using auto width & height, or fsaa settings)
renderSysThe RenderSystem to use
connectedNodesArray of connected nodes that may be using our buffers and need to be notified.
passesArray of Compositor Passes which may contain the texture being recreated When the pointer is null, we don't iterate through it.

◆ recreateResizableTextures01()

static void Ogre::TextureDefinitionBase::recreateResizableTextures01 ( const TextureDefinitionVec textureDefs,
CompositorChannelVec inOutTexContainer,
const TextureGpu finalTarget 
)
staticinherited

Destroys & recreates only the textures that depend on the main RT (e.g.

the Render Window) resolution.

Remarks
This is divided in two steps: recreateResizableTextures01 & recreateResizableTextures02 since in some cases in RenderPassDescriptor, setting up MRT and depth textures requires all textures to be up to date, otherwise validation errors would occur since we'll have partial data (e.g. MRT 0 is 1024x768 while MRT 1 is 800x600)
Parameters
textureDefsArray of texture definitions, so we know which ones depend on main RT's resolution
inOutTexContainerWhere we'll replace the RTs & textures
finalTargetThe final render target (usually the render window) we have to clone parameters from (eg. when using auto width & height, or fsaa settings)
renderSysThe RenderSystem to use

◆ recreateResizableTextures02()

static void Ogre::TextureDefinitionBase::recreateResizableTextures02 ( const TextureDefinitionVec textureDefs,
CompositorChannelVec inOutTexContainer,
const CompositorNodeVec connectedNodes,
const CompositorPassVec passes 
)
staticinherited

See recreateResizableTextures01 Updates involved RenderPassDescriptors.

Parameters
connectedNodesArray of connected nodes that may be using our textures and need to be notified.
passesArray of Compositor Passes which may contain the texture being recreated When the pointer is null, we don't iterate through it.

◆ removeAllRenderTextureViews()

void Ogre::TextureDefinitionBase::removeAllRenderTextureViews ( )
inherited

◆ removeBuffer()

virtual void Ogre::TextureDefinitionBase::removeBuffer ( IdString  name)
virtualinherited

Remove a buffer. Buffer can come from an input channel, or a locally defined one.

◆ removeNodeAlias()

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.

◆ removeRenderTextureView()

void Ogre::TextureDefinitionBase::removeRenderTextureView ( IdString  name)
inherited

◆ removeTexture()

virtual void Ogre::TextureDefinitionBase::removeTexture ( IdString  name)
virtualinherited

WARNING: Be very careful with this function.

Removes a texture. If the texture is from an input channel (TEXTURE_INPUT), the input channel is removed. If the texture is a local definition (TEXTURE_LOCAL) the texture definition is removed and all the references to mLocalTextureDefs[i+1] ... mLocalTextureDefs[i+n] are updated. However, the output channels will now contain an invalid index and will only be removed if it was the last output channel (since we can't alter the order). It is your responsability to call CompositorNodeDef::mapOutputChannel again with a valid texture name to the channel it was occupying. If the texture is a global texture (TEXTURE_GLOBAL), the global texture can no longer be accessed until addTextureSourceName( name, 0, TEXTURE_GLOBAL ) is called again.

Parameters
nameName of the texture to remove.

Reimplemented in Ogre::CompositorNodeDef.

◆ renameBuffer()

void Ogre::TextureDefinitionBase::renameBuffer ( IdString  oldName,
const String newName 
)
inherited

Changes the name of a buffer.

Buffer can come from an input channel, or a locally defined one.

◆ renameTexture()

void Ogre::TextureDefinitionBase::renameTexture ( IdString  oldName,
const String newName 
)
inherited

Changes the name of a texture.

Texture can come from an input channel, be a global texture, or a locally defined one. You can't rename a global texture to avoid the "global_" prefix, or add the "global_" prefix to a texture that wasn't global.

◆ setNumLocalBufferDefinitions()

void Ogre::TextureDefinitionBase::setNumLocalBufferDefinitions ( size_t  numTDs)
inlineinherited

Reserves enough memory for all texture definitions.

Remarks
Calling this function is not obligatory, but recommended
Parameters
numPassesThe number of texture definitions expected to contain.

◆ setNumLocalTextureDefinitions()

void Ogre::TextureDefinitionBase::setNumLocalTextureDefinitions ( size_t  numTDs)
inlineinherited

Reserves enough memory for all texture definitions.

Remarks
Calling this function is not obligatory, but recommended
Parameters
numPassesThe number of texture definitions expected to contain.

◆ setupTexture()

static void Ogre::TextureDefinitionBase::setupTexture ( TextureGpu tex,
const TextureDefinition textureDef,
const TextureGpu finalTarget 
)
staticinherited

Friends And Related Function Documentation

◆ CompositorWorkspace

friend class CompositorWorkspace
friend

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