Cogs.Core
|
Public Member Functions | |
void | initialize (GraphicsDeviceD3D11 *graphicsDevice, TexturesD3D11 *textures) |
void | annotate (RenderTargetHandle handle, const StringView &name) override |
Associate a name with an object for use in graphics debugging. | |
void | annotate (DepthStencilHandle handle, const StringView &name) override |
Associate a name with an object for use in graphics debugging. | |
RenderTargetHandle | createRenderTarget (ID3D11Texture2D *texture, bool persistent=false) |
void | releaseRenderTarget (RenderTargetHandle handle) |
Release the render target with the given renderTargetHandle. | |
RenderTargetHandle | createRenderTarget (const RenderTargetViewDescription *renderTargetViews, const size_t numViews) |
Create a render target using the given view descriptions. | |
DepthStencilHandle | createDepthStencilTarget (const RenderTargetHandle handle, const DepthStencilViewDescription &depthStencilView) |
Creates a depth stencil view using the given description. | |
DepthStencilHandle | createDepthStencilTarget (const RenderTargetHandle handle) override |
Creates a depth/stencil target to back the render target with the given handle. | |
DepthStencilHandle | createDepthStencilTarget (const RenderTargetHandle handle, const TextureHandle textureHandle) override |
Creates a depth/stencil target to back the render target with the given handle. | |
void | releaseDepthStencilTarget (DepthStencilHandle handle) override |
Release the depth target with the given depthStencilHandle. | |
DepthStencilStateHandle | loadDepthStencilState (const DepthStencilState &depthStencilState) override |
Load a depth stencil state object. | |
void | releaseDepthStencilState (DepthStencilStateHandle handle) override |
Release the depth stencil state with the given handle. | |
RasterizerStateHandle | loadRasterizerState (const RasterizerState &rasterizerState) override |
Load a rasterizer state object. | |
void | releaseRasterizerState (RasterizerStateHandle handle) override |
Release the rasterizer state with the given handle. | |
BlendStateHandle | loadBlendState (const BlendState &blendState) override |
Load a blend state object. | |
BlendStateHandle | loadBlendState (const BlendState &blendStateColor, const BlendState &blendStateAlpha) override |
Load a blend state object with separate blending for alpha channel. | |
BlendStateHandle | loadBlendState (const BlendState &blendStateColor, const BlendState &blendStateAlpha, const uint32_t flags) override |
BlendStateHandle | loadBlendState (const BlendState *blendStateColor, const BlendState *blendStateAlpha, const uint32_t numBlendState, const uint32_t flags) override |
void | releaseBlendState (BlendStateHandle handle) override |
Release the blend state with the given handle. | |
void | releaseResources () override |
Release all allocated render target resources. | |
![]() | |
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. | |
Public Attributes | |
ResourceMap< DepthStencilStateHandle, ResourcePointer< ID3D11DepthStencilState > > | depthStencilStates |
ResourceMap< RasterizerStateHandle, ResourcePointer< ID3D11RasterizerState > > | rasterizerStates |
ResourceMap< BlendStateHandle, ResourcePointer< ID3D11BlendState > > | blendStates |
ResourceMap< RenderTargetHandle, RenderTargetD3D11 > | renderTargets |
ResourceMap< DepthStencilHandle, ResourcePointer< ID3D11DepthStencilView > > | depthStencilViews |
Private Attributes | |
GraphicsDeviceD3D11 * | graphicsDevice = nullptr |
TexturesD3D11 * | textures = nullptr |
Definition at line 21 of file RenderTargetsD3D11.h.
|
overridevirtual |
Associate a name with an object for use in graphics debugging.
Reimplemented from Cogs::IRenderTargets.
Definition at line 66 of file RenderTargetsD3D11.cpp.
References Cogs::StringView::data(), Cogs::StringView::empty(), and Cogs::StringView::length().
|
overridevirtual |
Associate a name with an object for use in graphics debugging.
Reimplemented from Cogs::IRenderTargets.
Definition at line 43 of file RenderTargetsD3D11.cpp.
References Cogs::StringView::empty().
|
overridevirtual |
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.
handle | Valid handle to a render target to create depth target backing for. |
Implements Cogs::IRenderTargets.
Definition at line 192 of file RenderTargetsD3D11.cpp.
References Cogs::TextureFlags::DepthBuffer, Cogs::Direct3D11::Formats, and Cogs::Handle_t< DepthStencilTag >::InvalidHandle.
|
virtual |
Creates a depth stencil view using the given description.
handle | Valid handle to a render target to create depth target backing for. |
depthStencilView | Depth stencil view description. |
Implements Cogs::IRenderTargets.
Definition at line 149 of file RenderTargetsD3D11.cpp.
References Cogs::Handle_t< DepthStencilTag >::InvalidHandle, Cogs::DepthStencilViewDescription::layerIndex, Cogs::DepthStencilViewDescription::levelIndex, Cogs::DepthStencilViewDescription::numLayers, and Cogs::DepthStencilViewDescription::texture.
Referenced by Cogs::SwapChainD3D11::createDepthStencilView().
|
overridevirtual |
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.
handle | Valid handle to a render target to create depth target backing for. |
textureHandle | Valid handle to a texture to use as backing to render depth values to. |
Implements Cogs::IRenderTargets.
Definition at line 229 of file RenderTargetsD3D11.cpp.
References Cogs::Handle_t< DepthStencilTag >::InvalidHandle.
|
virtual |
Create a render target using the given view descriptions.
renderTargetViews | Pointer to an array of render target view descriptions. |
numViews | Number of views in the array pointed to by renderTargetViews. |
Implements Cogs::IRenderTargets.
Definition at line 105 of file RenderTargetsD3D11.cpp.
References Cogs::Handle_t< RenderTargetTag >::InvalidHandle, Cogs::RenderTargetViewDescription::layerIndex, Cogs::RenderTargetViewDescription::levelIndex, Cogs::RenderTargetViewDescription::numLayers, and Cogs::RenderTargetViewDescription::texture.
Cogs::RenderTargetHandle Cogs::RenderTargetsD3D11::createRenderTarget | ( | ID3D11Texture2D * | texture, |
bool | persistent = false |
||
) |
Definition at line 82 of file RenderTargetsD3D11.cpp.
|
inline |
Definition at line 23 of file RenderTargetsD3D11.h.
|
overridevirtual |
Load a blend state object.
blendState | Blend state object to load. |
Implements Cogs::IRenderTargets.
Definition at line 367 of file RenderTargetsD3D11.cpp.
|
overridevirtual |
Load a blend state object with separate blending for alpha channel.
blendStateColor | Blend state object for the color channels to load. |
blendStateAlpha | Blend state object for the alpha channel to load. |
Reimplemented from Cogs::IRenderTargets.
Definition at line 372 of file RenderTargetsD3D11.cpp.
|
overridevirtual |
Reimplemented from Cogs::IRenderTargets.
Definition at line 377 of file RenderTargetsD3D11.cpp.
|
overridevirtual |
Reimplemented from Cogs::IRenderTargets.
Definition at line 382 of file RenderTargetsD3D11.cpp.
|
overridevirtual |
Load a depth stencil state object.
depthStencilState | Depth stencil state object to load. |
Implements Cogs::IRenderTargets.
Definition at line 279 of file RenderTargetsD3D11.cpp.
References Cogs::DepthStencilState::depthEnabled, Cogs::DepthStencilState::depthFunction, Cogs::Handle_t< struct DepthStencilState >::InvalidHandle, and Cogs::DepthStencilState::writeEnabled.
|
overridevirtual |
Load a rasterizer state object.
rasterizerState | Rasterizer state object to load. |
Implements Cogs::IRenderTargets.
Definition at line 334 of file RenderTargetsD3D11.cpp.
References Cogs::RasterizerState::cullMode, Cogs::RasterizerState::depthBias, Cogs::RasterizerState::depthBiasClamp, Cogs::RasterizerState::frontCounterClockwise, Cogs::Handle_t< struct RasterizerState >::InvalidHandle, Cogs::RasterizerState::multiSample, Cogs::RasterizerState::noDepthClip, Cogs::RasterizerState::scissor, Cogs::RasterizerState::slopeScaledDepthBias, and Cogs::RasterizerState::wireFrame.
|
overridevirtual |
Release the blend state with the given handle.
handle | Valid handle to a blend state object. |
Implements Cogs::IRenderTargets.
Definition at line 418 of file RenderTargetsD3D11.cpp.
|
overridevirtual |
Release the depth stencil state with the given handle.
handle | Valid handle to a depth stencil state object. |
Implements Cogs::IRenderTargets.
Definition at line 317 of file RenderTargetsD3D11.cpp.
|
overridevirtual |
Release the depth target with the given depthStencilHandle.
depthStencilHandle | Valid handle to a previously created depth/stencil target. |
Implements Cogs::IRenderTargets.
Definition at line 257 of file RenderTargetsD3D11.cpp.
Referenced by Cogs::SwapChainD3D11::createDepthStencilView().
|
overridevirtual |
Release the rasterizer state with the given handle.
handle | Valid handle to a rasterizer state object. |
Implements Cogs::IRenderTargets.
Definition at line 362 of file RenderTargetsD3D11.cpp.
|
virtual |
Release the render target with the given renderTargetHandle.
renderTargetHandle | Valid handle to a previously created render target. |
Implements Cogs::IRenderTargets.
Definition at line 100 of file RenderTargetsD3D11.cpp.
Referenced by Cogs::SwapChainD3D11::createRenderTargetView().
|
overridevirtual |
Release all allocated render target resources.
Implements Cogs::IRenderTargets.
Definition at line 423 of file RenderTargetsD3D11.cpp.
ResourceMap<BlendStateHandle, ResourcePointer<ID3D11BlendState> > Cogs::RenderTargetsD3D11::blendStates |
Definition at line 59 of file RenderTargetsD3D11.h.
ResourceMap<DepthStencilStateHandle, ResourcePointer<ID3D11DepthStencilState> > Cogs::RenderTargetsD3D11::depthStencilStates |
Definition at line 57 of file RenderTargetsD3D11.h.
ResourceMap<DepthStencilHandle, ResourcePointer<ID3D11DepthStencilView> > Cogs::RenderTargetsD3D11::depthStencilViews |
Definition at line 62 of file RenderTargetsD3D11.h.
|
private |
Definition at line 65 of file RenderTargetsD3D11.h.
ResourceMap<RasterizerStateHandle, ResourcePointer<ID3D11RasterizerState> > Cogs::RenderTargetsD3D11::rasterizerStates |
Definition at line 58 of file RenderTargetsD3D11.h.
ResourceMap<RenderTargetHandle, RenderTargetD3D11> Cogs::RenderTargetsD3D11::renderTargets |
Definition at line 61 of file RenderTargetsD3D11.h.
|
private |
Definition at line 66 of file RenderTargetsD3D11.h.