Cogs.Rendering
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Cogs::IRenderTargets Struct Referenceabstract

Provides render target management functionality. More...

#include <IRenderTargets.h>

Public Member Functions

virtual void annotate (RenderTargetHandle handle, const StringView &name)
 Associate a name with an object for use in graphics debugging.
 
virtual void annotate (DepthStencilHandle handle, const StringView &name)
 Associate a name with an object for use in graphics debugging.
 
virtual RenderTargetHandle createRenderTarget (TextureHandle textureHandle)
 Create a render target using the given texture to render into.
 
virtual RenderTargetHandle createRenderTarget (TextureHandle *textureHandles, const size_t numTextureHandles)
 Create a multi render target (MRT) with using the given textures to render into.
 
virtual RenderTargetHandle createRenderTarget (const RenderTargetViewDescription *renderTargetViews, const size_t numViews)=0
 Create a render target using the given view descriptions.
 
virtual RenderTargetHandle createRenderTarget (const RenderTargetViewDescription *, const size_t, const MultiViewDescription &)
 
virtual void releaseRenderTarget (RenderTargetHandle renderTargetHandle)=0
 Release the render target with the given renderTargetHandle.
 
virtual DepthStencilHandle createDepthStencilTarget (const RenderTargetHandle handle)=0
 Creates a depth/stencil target to back the render target with the given handle.
 
virtual DepthStencilHandle createDepthStencilTarget (const RenderTargetHandle handle, const TextureHandle textureHandle)=0
 Creates a depth/stencil target to back the render target with the given handle.
 
virtual DepthStencilHandle createDepthStencilTarget (const RenderTargetHandle handle, const DepthStencilViewDescription &depthStencilView)=0
 Creates a depth stencil view using the given description.
 
virtual DepthStencilHandle createDepthStencilTarget (const RenderTargetHandle, const DepthStencilViewDescription &, const MultiViewDescription &)
 
virtual void releaseDepthStencilTarget (DepthStencilHandle depthStencilHandle)=0
 Release the depth target with the given depthStencilHandle.
 
virtual DepthStencilStateHandle loadDepthStencilState (const DepthStencilState &depthStencilState)=0
 Load a depth stencil state object.
 
virtual void releaseDepthStencilState (DepthStencilStateHandle handle)=0
 Release the depth stencil state with the given handle.
 
virtual RasterizerStateHandle loadRasterizerState (const RasterizerState &rasterizerState)=0
 Load a rasterizer state object.
 
virtual void releaseRasterizerState (RasterizerStateHandle handle)=0
 Release the rasterizer state with the given handle.
 
virtual BlendStateHandle loadBlendState (const BlendState &blendState)=0
 Load a blend state object.
 
virtual BlendStateHandle loadBlendState (const BlendState &blendStateColor, const BlendState &blendStateAlpha)
 Load a blend state object with separate blending for alpha channel.
 
virtual BlendStateHandle loadBlendState (const BlendState &blendStateColor, const BlendState &blendStateAlpha, const uint32_t flags)
 
virtual BlendStateHandle loadBlendState (const BlendState *blendStateColor, const BlendState *blendStateAlpha, const uint32_t numBlendStates, const uint32_t flags)
 
virtual void releaseBlendState (BlendStateHandle handle)=0
 Release the blend state with the given handle.
 
virtual void releaseResources ()=0
 Release all allocated render target resources.
 

Detailed Description

Provides render target management functionality.

Member Function Documentation

◆ annotate() [1/2]

virtual void Cogs::IRenderTargets::annotate ( DepthStencilHandle  handle,
const StringView &  name 
)
inlinevirtual

Associate a name with an object for use in graphics debugging.

◆ annotate() [2/2]

virtual void Cogs::IRenderTargets::annotate ( RenderTargetHandle  handle,
const StringView &  name 
)
inlinevirtual

Associate a name with an object for use in graphics debugging.

◆ createDepthStencilTarget() [1/4]

virtual DepthStencilHandle Cogs::IRenderTargets::createDepthStencilTarget ( const RenderTargetHandle  handle)
pure virtual

Creates a depth/stencil target to back the render target with the given handle.

The dimensions of the render target are matched and a suitable depth format for the graphics device is chosen.

Parameters
handleValid handle to a render target to create depth target backing for.
Returns
Handle to the newly created depth target, InvalidHandle if the operation failed.

◆ createDepthStencilTarget() [2/4]

virtual DepthStencilHandle Cogs::IRenderTargets::createDepthStencilTarget ( const RenderTargetHandle  handle,
const DepthStencilViewDescription depthStencilView 
)
pure virtual

Creates a depth stencil view using the given description.

Parameters
handleValid handle to a render target to create depth target backing for.
depthStencilViewDepth stencil view description.
Returns
Handle to the newly created depth stencil target, InvalidHandle if the operation failed.

◆ createDepthStencilTarget() [3/4]

virtual DepthStencilHandle Cogs::IRenderTargets::createDepthStencilTarget ( const RenderTargetHandle  handle,
const TextureHandle  textureHandle 
)
pure virtual

Creates a depth/stencil target to back the render target with the given handle.

The texture with the given textureHandle is used as backing for the depth target. The texture must be of a format that supports depth values, and be flagged for use as a depth texture.

Parameters
handleValid handle to a render target to create depth target backing for.
textureHandleValid handle to a texture to use as backing to render depth values to.
Returns
Handle to the newly created depth stencil target, InvalidHandle if the operation failed.

◆ createDepthStencilTarget() [4/4]

virtual DepthStencilHandle Cogs::IRenderTargets::createDepthStencilTarget ( const  RenderTargetHandle,
const DepthStencilViewDescription ,
const MultiViewDescription  
)
inlinevirtual

◆ createRenderTarget() [1/4]

virtual RenderTargetHandle Cogs::IRenderTargets::createRenderTarget ( const RenderTargetViewDescription ,
const  size_t,
const MultiViewDescription  
)
inlinevirtual

◆ createRenderTarget() [2/4]

virtual RenderTargetHandle Cogs::IRenderTargets::createRenderTarget ( const RenderTargetViewDescription renderTargetViews,
const size_t  numViews 
)
pure virtual

Create a render target using the given view descriptions.

Parameters
renderTargetViewsPointer to an array of render target view descriptions.
numViewsNumber of views in the array pointed to by renderTargetViews.
Returns
Handle to a render target, InvalidHandle if the operation failed.

◆ createRenderTarget() [3/4]

virtual RenderTargetHandle Cogs::IRenderTargets::createRenderTarget ( TextureHandle textureHandles,
const size_t  numTextureHandles 
)
inlinevirtual

Create a multi render target (MRT) with using the given textures to render into.

Parameters
textureHandlesPointer to an array of valid texture handles to textures to use as render textures for the render target.
numTextureHandlesNumber of textures to use as targets in the MRT.
Returns
Handle to the newly created render target, InvalidHandle if the operation failed.

References createRenderTarget(), Cogs::RenderTargetViewDescription::layerIndex, Cogs::RenderTargetViewDescription::levelIndex, Cogs::RenderTargetViewDescription::numLayers, and Cogs::RenderTargetViewDescription::texture.

◆ createRenderTarget() [4/4]

virtual RenderTargetHandle Cogs::IRenderTargets::createRenderTarget ( TextureHandle  textureHandle)
inlinevirtual

Create a render target using the given texture to render into.

Parameters
textureHandleValid handle to a texture to use as render texture for the render target.
Returns
Handle to the newly created render target, InvalidHandle if the operation failed.

References createRenderTarget().

Referenced by createRenderTarget().

◆ loadBlendState() [1/4]

virtual BlendStateHandle Cogs::IRenderTargets::loadBlendState ( const BlendState blendState)
pure virtual

Load a blend state object.

Parameters
blendStateBlend state object to load.
Returns
Handle to the newly loaded blend state object, InvalidHandle if the operation failed.

◆ loadBlendState() [2/4]

virtual BlendStateHandle Cogs::IRenderTargets::loadBlendState ( const BlendState blendStateColor,
const BlendState blendStateAlpha 
)
inlinevirtual

Load a blend state object with separate blending for alpha channel.

Parameters
blendStateColorBlend state object for the color channels to load.
blendStateAlphaBlend state object for the alpha channel to load.
Returns
Handle to the newly loaded blend state object, InvalidHandle if the operation failed.

References loadBlendState().

Referenced by loadBlendState().

◆ loadBlendState() [3/4]

virtual BlendStateHandle Cogs::IRenderTargets::loadBlendState ( const BlendState blendStateColor,
const BlendState blendStateAlpha,
const uint32_t  flags 
)
inlinevirtual

References loadBlendState().

Referenced by loadBlendState().

◆ loadBlendState() [4/4]

virtual BlendStateHandle Cogs::IRenderTargets::loadBlendState ( const BlendState blendStateColor,
const BlendState blendStateAlpha,
const uint32_t  numBlendStates,
const uint32_t  flags 
)
inlinevirtual

◆ loadDepthStencilState()

virtual DepthStencilStateHandle Cogs::IRenderTargets::loadDepthStencilState ( const DepthStencilState depthStencilState)
pure virtual

Load a depth stencil state object.

Parameters
depthStencilStateDepth stencil state object to load.
Returns
Handle to the newly loaded depth stencil state object, InvalidHandle if the operation failed.

◆ loadRasterizerState()

virtual RasterizerStateHandle Cogs::IRenderTargets::loadRasterizerState ( const RasterizerState rasterizerState)
pure virtual

Load a rasterizer state object.

Parameters
rasterizerStateRasterizer state object to load.
Returns
Handle to the newly loaded rasterizer state object, InvalidHandle if the operation failed.

◆ releaseBlendState()

virtual void Cogs::IRenderTargets::releaseBlendState ( BlendStateHandle  handle)
pure virtual

Release the blend state with the given handle.

Parameters
handleValid handle to a blend state object.

◆ releaseDepthStencilState()

virtual void Cogs::IRenderTargets::releaseDepthStencilState ( DepthStencilStateHandle  handle)
pure virtual

Release the depth stencil state with the given handle.

Parameters
handleValid handle to a depth stencil state object.

◆ releaseDepthStencilTarget()

virtual void Cogs::IRenderTargets::releaseDepthStencilTarget ( DepthStencilHandle  depthStencilHandle)
pure virtual

Release the depth target with the given depthStencilHandle.

Parameters
depthStencilHandleValid handle to a previously created depth/stencil target.

◆ releaseRasterizerState()

virtual void Cogs::IRenderTargets::releaseRasterizerState ( RasterizerStateHandle  handle)
pure virtual

Release the rasterizer state with the given handle.

Parameters
handleValid handle to a rasterizer state object.

◆ releaseRenderTarget()

virtual void Cogs::IRenderTargets::releaseRenderTarget ( RenderTargetHandle  renderTargetHandle)
pure virtual

Release the render target with the given renderTargetHandle.

Parameters
renderTargetHandleValid handle to a previously created render target.

◆ releaseResources()

virtual void Cogs::IRenderTargets::releaseResources ( )
pure virtual

Release all allocated render target resources.


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