|  | OGRE-Next 3.0.0
    Object-Oriented Graphics Rendering Engine | 
Centralized class for dealing with declarations of textures in Node & Workspace definitions. More...
#include <OgreTextureDefinition.h>
 Inheritance diagram for Ogre::TextureDefinitionBase:
 Inheritance diagram for Ogre::TextureDefinitionBase:| Classes | |
| struct | BufferDefinition | 
| class | TextureDefinition | 
| Local texture definition.  More... | |
| 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 | |
| TextureDefinitionBase (TextureSource defaultSource) | |
| 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. | |
| Static Public Member Functions | |
| 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 | 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) | 
Centralized class for dealing with declarations of textures in Node & Workspace definitions.
Note that shadow nodes use their own system
| typedef vector<BufferDefinition>::type Ogre::TextureDefinitionBase::BufferDefinitionVec | 
| typedef vector<PixelFormatGpu>::type Ogre::TextureDefinitionBase::PixelFormatGpuVec | 
| typedef vector<TextureDefinition>::type Ogre::TextureDefinitionBase::TextureDefinitionVec | 
| Ogre::TextureDefinitionBase::TextureDefinitionBase | ( | TextureSource | defaultSource | ) | 
| void Ogre::TextureDefinitionBase::addBufferDefinition | ( | IdString | name, | 
| size_t | numElements, | ||
| uint32 | bytesPerElement, | ||
| uint32 | bindFlags, | ||
| float | widthFactor, | ||
| float | heightFactor | ||
| ) | 
Creates an UAV buffer.
| name | Name 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. | 
| bindFlags | Bitmask. | 
| widthFactor | 
| heightFactor | 
| 
 | virtual | 
Buffers.
Specifies that buffer incoming from channel 'inputChannel' will be referenced by the name 'name'
| inputChannel | Input channel # the buffer comes from. | 
| name | Name 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.
| RenderTargetViewDef * Ogre::TextureDefinitionBase::addRenderTextureView | ( | IdString | name | ) | 
| TextureDefinition * Ogre::TextureDefinitionBase::addTextureDefinition | ( | const String & | name | ) | 
Creates a TextureDefinition with a given name, must be unique.
| name | The 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. | 
| 
 | virtual | 
Adds a texture name, whether a real one or an alias, and where to grab it from.
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
| name | The 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. | 
| index | Index 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. | 
| textureSource | Source where the index must be used (eg. TEXTURE_LOCAL means mLocalTextureDefs) | 
Reimplemented in Ogre::CompositorShadowNodeDef.
| 
 | static | 
| 
 | static | 
Utility function to create the buffers based on a given set of buffer definitions and put them in a container.
| 
 | static | 
| 
 | static | 
Utility function to create the textures based on a given set of texture definitions and put them in a container.
| textureDefs | Array of texture definitions | 
| inOutTexContainer | Where we'll store the newly created RTs & textures | 
| id | Unique id in the case we want textures to have unique names (uniqueNames must be true) | 
| uniqueNames | Set 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) | 
| finalTarget | The final render target (usually the render window) we have to clone parameters from (eg. when using auto width & height, or fsaa settings) | 
| renderSys | The RenderSystem to use | 
| 
 | static | 
| 
 | static | 
| 
 | inline | 
| 
 | inline | 
Returns the local buffer definitions.
| 
 | inline | 
| 
 | inline | 
Returns the local texture definitions.
| 
 | inline | 
| size_t Ogre::TextureDefinitionBase::getNumInputBufferChannels | ( | ) | const | 
| size_t Ogre::TextureDefinitionBase::getNumInputChannels | ( | ) | const | 
This has O(N) complexity! (not cached, we look in mNameToChannelMap)
| const RenderTargetViewDef * Ogre::TextureDefinitionBase::getRenderTargetViewDef | ( | IdString | name | ) | const | 
| RenderTargetViewDef * Ogre::TextureDefinitionBase::getRenderTargetViewDefNonConstNoThrow | ( | IdString | name | ) | 
| void Ogre::TextureDefinitionBase::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.
| name | The 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 | 
| 
 | static | 
Destroys & recreates only the buffers that depend on the main RT (i.e.
the RenderWindow) resolution
| textureDefs | Array of texture definitions, so we know which ones depend on main RT's resolution | 
| inOutTexContainer | Where we'll replace the RTs & textures | 
| finalTarget | The final render target (usually the render window) we have to clone parameters from (eg. when using auto width & height, or fsaa settings) | 
| renderSys | The RenderSystem to use | 
| connectedNodes | Array of connected nodes that may be using our buffers and need to be notified. | 
| passes | Array of Compositor Passes which may contain the texture being recreated When the pointer is null, we don't iterate through it. | 
| 
 | static | 
Destroys & recreates only the textures that depend on the main RT (e.g.
the Render Window) resolution.
| textureDefs | Array of texture definitions, so we know which ones depend on main RT's resolution | 
| inOutTexContainer | Where we'll replace the RTs & textures | 
| finalTarget | The final render target (usually the render window) we have to clone parameters from (eg. when using auto width & height, or fsaa settings) | 
| 
 | static | 
See recreateResizableTextures01 Updates involved RenderPassDescriptors.
| connectedNodes | Array of connected nodes that may be using our textures and need to be notified. | 
| passes | Array of Compositor Passes which may contain the texture being recreated When the pointer is null, we don't iterate through it. | 
| void Ogre::TextureDefinitionBase::removeAllRenderTextureViews | ( | ) | 
| 
 | virtual | 
Remove a buffer. Buffer can come from an input channel, or a locally defined one.
| void Ogre::TextureDefinitionBase::removeRenderTextureView | ( | IdString | name | ) | 
| 
 | virtual | 
WARNING: Be very careful with this function.
Removes a texture.
| name | Name of the texture to remove. | 
Reimplemented in Ogre::CompositorNodeDef.
Changes the name of a buffer.
Buffer can come from an input channel, or a locally defined one.
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.
| 
 | inline | 
Reserves enough memory for all texture definitions.
| numTDs | The number of texture definitions expected to contain. | 
| 
 | inline | 
Reserves enough memory for all texture definitions.
| numTDs | The number of texture definitions expected to contain. | 
| 
 | static |