OGRE  2.2.4
Object-Oriented Graphics Rendering Engine
Ogre::CompositorShadowNodeDef Class Reference

Shadow Nodes are special nodes (not to be confused with. More...

#include <OgreCompositorShadowNodeDef.h>

+ Inheritance diagram for Ogre::CompositorShadowNodeDef:

Public Types

typedef vector< BufferDefinition >::type BufferDefinitionVec
 
typedef vector< PixelFormatGpu >::type PixelFormatGpuVec
 
typedef vector< TextureDefinition >::type TextureDefinitionVec
 
enum  TextureSource { TEXTURE_INPUT, TEXTURE_LOCAL, TEXTURE_GLOBAL, NUM_TEXTURES_SOURCES }
 

Public Member Functions

 CompositorShadowNodeDef (const String &name, CompositorManager2 *compositorManager)
 
virtual ~CompositorShadowNodeDef ()
 
virtual void _validateAndFinish (void)
 Checks that paremeters are correctly set, and finalizes whatever needs to be done, probably because not enough data was available at the time of creation. 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...
 
RenderTargetViewDefaddRenderTextureView (IdString name)
 
ShadowTextureDefinitionaddShadowTextureDefinition (size_t lightIdx, size_t split, const String &name, const Vector2 &uvOffset, const Vector2 &uvLength, uint8 arrayIdx)
 Adds a new ShadowTexture definition. More...
 
CompositorTargetDefaddTargetPass (const String &renderTargetName, uint32 rtIndex=0)
 Adds a new Target pass. More...
 
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)
 Overloaded to prevent creating input channels. More...
 
CompositorManager2getCompositorManager (void) const
 
const BufferDefinitionVecgetLocalBufferDefinitions (void) const
 
BufferDefinitionVecgetLocalBufferDefinitionsNonConst (void)
 Returns the local buffer definitions. More...
 
const TextureDefinitionVecgetLocalTextureDefinitions (void) const
 
TextureDefinitionVecgetLocalTextureDefinitionsNonConst (void)
 Returns the local texture definitions. More...
 
IdString getName (void) const
 
String getNameStr (void) const
 
const NameToChannelMap & getNameToChannelMap (void) const
 
size_t getNumInputBufferChannels (void) const
 
size_t getNumInputChannels (void) const
 This has O(N) complexity! (not cached, we look in mNameToChannelMap) More...
 
size_t getNumOutputChannels (void) const
 Returns the number of output channels. More...
 
size_t getNumShadowTextureDefinitions () const
 Gets the number of shadow texture definitions in this node. More...
 
size_t getNumTargetPasses (void) const
 Gets the number of passes in this node. More...
 
size_t getPassNumber (const CompositorPassDef *passDef) const
 Returns the pass # of the given pass definition in this node. More...
 
const RenderTargetViewDefgetRenderTargetViewDef (IdString name) const
 
RenderTargetViewDefgetRenderTargetViewDefNonConstNoThrow (IdString name)
 
const ShadowTextureDefinitiongetShadowTextureDefinition (size_t texIndex) const
 Retrieves a shadow texture definition by its index. More...
 
ShadowTextureDefinitiongetShadowTextureDefinitionNonConst (size_t texIndex)
 
bool getStartEnabled (void) const
 
CompositorTargetDefgetTargetPass (size_t passIndex)
 Retrieves an existing pass by it's given index. More...
 
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. More...
 
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 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. More...
 
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. More...
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
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 * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 
virtual void postInitializePassDef (CompositorPassDef *passDef)
 Called right after we create a pass definition. More...
 
void removeAllRenderTextureViews (void)
 
virtual void removeBuffer (IdString name)
 Remove a buffer. Buffer can come from an input channel, or a locally defined one. 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 setDefaultTechnique (ShadowMapTechniques techn)
 
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...
 
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) More...
 
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) More...
 
void setNumShadowTextureDefinitions (size_t numTex)
 Reserves enough memory for all texture definitions. More...
 
void setNumTargetPass (size_t numPasses)
 Reserves enough memory for all passes. More...
 
void setStartEnabled (bool enabled)
 Whether the node should be start as enabled when instantiated. 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)
 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)
 

Public Attributes

IdString mCustomIdentifier
 

Friends

class CompositorShadowNode
 

Detailed Description

Shadow Nodes are special nodes (not to be confused with.

See also
CompositorNode) that are only used for rendering shadow maps. Normal Compositor Nodes can share or own a ShadowNode. The ShadowNode will render the scene enough times to fill all shadow maps so the main scene pass can use them.
ShadowNode are very flexible compared to Ogre 1.x; as they allow mixing multiple shadow camera setups for different lights.
Author
Matias N. Goldberg
Version
1.0

Member Typedef Documentation

◆ BufferDefinitionVec

◆ 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

◆ CompositorShadowNodeDef()

Ogre::CompositorShadowNodeDef::CompositorShadowNodeDef ( const String name,
CompositorManager2 compositorManager 
)
inline

◆ ~CompositorShadowNodeDef()

virtual Ogre::CompositorShadowNodeDef::~CompositorShadowNodeDef ( )
inlinevirtual

Member Function Documentation

◆ _validateAndFinish()

virtual void Ogre::CompositorShadowNodeDef::_validateAndFinish ( void  )
virtual

Checks that paremeters are correctly set, and finalizes whatever needs to be done, probably because not enough data was available at the time of creation.

Remarks
If possible, try to validate parameters at creation time to avoid delaying when the error shows up. We should validate here if it's not possible to validate at any other time or if it's substantially easier to do so here.

◆ 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::CompositorShadowNodeDef::addBufferInput ( size_t  inputChannel,
IdString  name 
)
virtual

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 from Ogre::TextureDefinitionBase.

◆ addRenderTextureView()

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

◆ addShadowTextureDefinition()

ShadowTextureDefinition* Ogre::CompositorShadowNodeDef::addShadowTextureDefinition ( size_t  lightIdx,
size_t  split,
const String name,
const Vector2 uvOffset,
const Vector2 uvLength,
uint8  arrayIdx 
)

Adds a new ShadowTexture definition.

Remarks
WARNING: Calling this function may invalidate all previous returned pointers unless you've properly called setNumShadowTextureDefinitions
Parameters
lightIdxNth Closest Light to assign this texture to. Must be unique unless split is different.
splitSplit for the given light. Only valid for CSM/PSSM shadow maps. Must be unique for the same lightIdx.
nameName to a declared texture that will hold our shadow map. Must not contain the "global_" prefix.
uvOffsetValues in range [0; 1] to determine what region of the texture will hold our shadow map (i.e. UV atlas). Use Vector2::ZERO if it covers the entire texture.
uvLengthValues in range [0; 1] to determine what region of the texture will hold our shadow map (i.e. UV atlas). Use Vector2::UNIT_SCALE if it covers the entire texture.
arrayIdxIf the texture is an array texture, index to the slice that holds our shadow map.

◆ addTargetPass()

CompositorTargetDef* Ogre::CompositorNodeDef::addTargetPass ( const String renderTargetName,
uint32  rtIndex = 0 
)
inherited

Adds a new Target pass.

Remarks
WARNING: Calling this function may invalidate all previous returned pointers unless you've properly called setNumTargetPass
Parameters
renderTargetNameWe need the full name, not just the hash; so we can check whether it has the global_ prefix
rtIndexThe RT to address if it is intended to use with a 3D texture (or a cubemap or a 2D Array) CompositorPassDef::mRtIndex. Default: 0

◆ 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
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::CompositorShadowNodeDef::addTextureSourceName ( const String name,
size_t  index,
TextureSource  textureSource 
)
virtual

Overloaded to prevent creating input channels.

Reimplemented from Ogre::TextureDefinitionBase.

◆ 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

createTextures

◆ getCompositorManager()

CompositorManager2* Ogre::CompositorNodeDef::getCompositorManager ( void  ) const
inlineinherited

◆ getLocalBufferDefinitions()

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

◆ getLocalBufferDefinitionsNonConst()

BufferDefinitionVec& Ogre::TextureDefinitionBase::getLocalBufferDefinitionsNonConst ( void  )
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 ( void  ) const
inlineinherited

◆ getLocalTextureDefinitionsNonConst()

TextureDefinitionVec& Ogre::TextureDefinitionBase::getLocalTextureDefinitionsNonConst ( void  )
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::CompositorNodeDef::getName ( void  ) const
inlineinherited

◆ getNameStr()

String Ogre::CompositorNodeDef::getNameStr ( void  ) const
inlineinherited

◆ getNameToChannelMap()

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

◆ getNumInputBufferChannels()

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

◆ getNumInputChannels()

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

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

◆ getNumOutputChannels()

size_t Ogre::CompositorNodeDef::getNumOutputChannels ( void  ) const
inlineinherited

Returns the number of output channels.

◆ getNumShadowTextureDefinitions()

size_t Ogre::CompositorShadowNodeDef::getNumShadowTextureDefinitions ( ) const
inline

Gets the number of shadow texture definitions in this node.

◆ getNumTargetPasses()

size_t Ogre::CompositorNodeDef::getNumTargetPasses ( void  ) const
inlineinherited

Gets the number of passes in this node.

◆ getPassNumber()

size_t Ogre::CompositorNodeDef::getPassNumber ( const CompositorPassDef passDef) const
inherited

Returns the pass # of the given pass definition in this node.

This operation is O(N). Useful for debug output.

Parameters
passDefThe pass definition to look for
Returns
Value in range [0; total_numer_of_passes_in_this_node) -1 if not found (pass doesn't belong to this node)

◆ getRenderTargetViewDef()

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

◆ getRenderTargetViewDefNonConstNoThrow()

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

◆ getShadowTextureDefinition()

const ShadowTextureDefinition* Ogre::CompositorShadowNodeDef::getShadowTextureDefinition ( size_t  texIndex) const
inline

Retrieves a shadow texture definition by its index.

◆ getShadowTextureDefinitionNonConst()

ShadowTextureDefinition* Ogre::CompositorShadowNodeDef::getShadowTextureDefinitionNonConst ( size_t  texIndex)
inline

◆ getStartEnabled()

bool Ogre::CompositorNodeDef::getStartEnabled ( void  ) const
inlineinherited

◆ getTargetPass()

CompositorTargetDef* Ogre::CompositorNodeDef::getTargetPass ( size_t  passIndex)
inlineinherited

Retrieves an existing pass by it's given index.

◆ getTextureSource() [1/2]

void Ogre::CompositorNodeDef::getTextureSource ( size_t  outputChannel,
size_t &  index,
TextureSource textureSource 
) const
inherited

Retrieves in which container to look for when wanting to know the output texture using the mappings from input/local texture -> output.

Parameters
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

◆ getTextureSource() [2/2]

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

Referenced by Ogre::CompositorNodeDef::getStartEnabled().

◆ mapOutputBufferChannel()

void Ogre::CompositorNodeDef::mapOutputBufferChannel ( size_t  outChannel,
IdString  bufferName 
)
inherited

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.

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) Prefer calling
See also
setNumOutputChannels beforehand Will throw if the local texture hasn't been declared yet or the input channel name hasn't been set yet (declaration order is important!).
Parameters
outChannelOutput channel # to map
textureNameName of the buffer

◆ mapOutputChannel()

void Ogre::CompositorNodeDef::mapOutputChannel ( size_t  outChannel,
IdString  textureName 
)
inherited

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.

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) Prefer calling
See also
setNumOutputChannels beforehand Will throw if the local texture hasn't been declared yet or the input channel name hasn't been set yet (declaration order is important!).
Parameters
outChannelOutput channel # to map
textureNameName of the texture, which can be to a local texture, or an input channel's name. Global textures aren't supported.

◆ 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,
void *   
)
inlineinherited

◆ operator delete() [3/3]

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
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,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

◆ operator new() [2/3]

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

◆ 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,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

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

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

◆ postInitializePassDef()

virtual void Ogre::CompositorShadowNodeDef::postInitializePassDef ( CompositorPassDef passDef)
virtual

Called right after we create a pass definition.

Derived classes may want to do something with it

Parameters
passDefNewly created pass to toy with.

Reimplemented from Ogre::CompositorNodeDef.

◆ 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 ( void  )
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.

◆ removeRenderTextureView()

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

◆ removeTexture()

virtual void Ogre::CompositorNodeDef::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 from Ogre::TextureDefinitionBase.

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

◆ setDefaultTechnique()

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

◆ setNumOutputBufferChannels()

void Ogre::CompositorNodeDef::setNumOutputBufferChannels ( size_t  numOuts)
inlineinherited

Reserves enough memory for all output channel mappings (efficient allocation, better than using linked lists or other containers with two level of indirections)

Remarks
Calling this function is not obligatory, but recommended
Parameters
numPassesThe number of output buffer channels expected to contain.

◆ setNumOutputChannels()

void Ogre::CompositorNodeDef::setNumOutputChannels ( size_t  numOuts)
inlineinherited

Reserves enough memory for all output channel mappings (efficient allocation, better than using linked lists or other containers with two level of indirections)

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

◆ setNumShadowTextureDefinitions()

void Ogre::CompositorShadowNodeDef::setNumShadowTextureDefinitions ( size_t  numTex)

Reserves enough memory for all texture definitions.

Remarks
Calling this function is not obligatory, but recommended
Parameters
numTexThe number of shadow textures expected to contain.

◆ setNumTargetPass()

void Ogre::CompositorNodeDef::setNumTargetPass ( size_t  numPasses)
inlineinherited

Reserves enough memory for all passes.

Remarks
Calling this function is obligatory, otherwise unexpected crashes may occur. CompositorTargetDef doesn't follow the Rule of Three.
Parameters
numPassesThe number of passes expected to contain.

◆ setStartEnabled()

void Ogre::CompositorNodeDef::setStartEnabled ( bool  enabled)
inlineinherited

Whether the node should be start as enabled when instantiated.

◆ setupTexture()

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

Friends And Related Function Documentation

◆ CompositorShadowNode

friend class CompositorShadowNode
friend

Member Data Documentation

◆ mCustomIdentifier

IdString Ogre::CompositorNodeDef::mCustomIdentifier
inherited

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