Cogs.Core
Public Member Functions | Public Attributes | Private Attributes | List of all members
Cogs::RenderTargetsGLES30 Struct Reference
Inheritance diagram for Cogs::RenderTargetsGLES30:
Cogs::IRenderTargets

Public Member Functions

void initialize (CapabilitiesGLES30 *caps, TexturesGLES30 *textures)
 
void releaseRenderTarget (RenderTargetHandle renderTargetHandle) override
 Release the render target with the given renderTargetHandle.
 
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 depthStencilHandle) 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.
 
void releaseBlendState (BlendStateHandle handle) override
 Release the blend state with the given handle.
 
void releaseResources () override
 Release all allocated render target resources.
 
bool bindRenderTargets (RenderTargetHandle renderTargetHandle, DepthStencilHandle depthStencilHandle)
 
virtual RenderTargetHandle createRenderTarget (const RenderTargetViewDescription *renderTargetViews, const size_t numViews) override
 Create a render target using the given view descriptions.
 
virtual DepthStencilHandle createDepthStencilTarget (const RenderTargetHandle handle, const DepthStencilViewDescription &depthStencilView) override
 Creates a depth stencil view using the given description.
 
virtual RenderTargetHandle createRenderTarget (const RenderTargetViewDescription *renderTargetViews, const size_t numViews, const MultiViewDescription &multiView) override
 
virtual DepthStencilHandle createDepthStencilTarget (const RenderTargetHandle handle, const DepthStencilViewDescription &depthStencilView, const MultiViewDescription &multiView) override
 
- Public Member Functions inherited from Cogs::IRenderTargets
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< BlendStateHandle, BlendStateGLES30blendStates
 
ResourceMap< RasterizerStateHandle, RasterizerStaterasterizerStates
 
ResourceMap< DepthStencilStateHandle, DepthStencilStatedepthStencilStates
 
ResourceMap< RenderTargetHandle, RenderTargetGLES30renderTargets
 
ResourceMap< DepthStencilHandle, DepthStencilTargetGLES30depthStencils
 

Private Attributes

TexturesGLES30textures = nullptr
 
CapabilitiesGLES30caps = nullptr
 

Detailed Description

Definition at line 50 of file RenderTargetsGLES30.h.

Member Function Documentation

◆ bindRenderTargets()

bool Cogs::RenderTargetsGLES30::bindRenderTargets ( RenderTargetHandle  renderTargetHandle,
DepthStencilHandle  depthStencilHandle 
)

Definition at line 315 of file RenderTargetsGLES30.cpp.

◆ createDepthStencilTarget() [1/4]

Cogs::DepthStencilHandle Cogs::RenderTargetsGLES30::createDepthStencilTarget ( const RenderTargetHandle  handle)
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.

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.

Implements Cogs::IRenderTargets.

Definition at line 458 of file RenderTargetsGLES30.cpp.

References Cogs::Handle_t< DepthStencilTag >::InvalidHandle.

◆ createDepthStencilTarget() [2/4]

Cogs::DepthStencilHandle Cogs::RenderTargetsGLES30::createDepthStencilTarget ( const RenderTargetHandle  handle,
const DepthStencilViewDescription depthStencilView 
)
overridevirtual

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.

Implements Cogs::IRenderTargets.

Definition at line 493 of file RenderTargetsGLES30.cpp.

References Cogs::Handle_t< RenderTargetTag >::InvalidHandle, and Cogs::Handle_t< DepthStencilTag >::InvalidHandle.

◆ createDepthStencilTarget() [3/4]

Cogs::DepthStencilHandle Cogs::RenderTargetsGLES30::createDepthStencilTarget ( const RenderTargetHandle  handle,
const DepthStencilViewDescription depthStencilView,
const MultiViewDescription multiView 
)
overridevirtual

Reimplemented from Cogs::IRenderTargets.

Definition at line 511 of file RenderTargetsGLES30.cpp.

◆ createDepthStencilTarget() [4/4]

Cogs::DepthStencilHandle Cogs::RenderTargetsGLES30::createDepthStencilTarget ( const RenderTargetHandle  handle,
const TextureHandle  textureHandle 
)
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.

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.

Implements Cogs::IRenderTargets.

Definition at line 474 of file RenderTargetsGLES30.cpp.

References Cogs::Handle_t< RenderTargetTag >::InvalidHandle, and Cogs::Handle_t< DepthStencilTag >::InvalidHandle.

◆ createRenderTarget() [1/2]

Cogs::RenderTargetHandle Cogs::RenderTargetsGLES30::createRenderTarget ( const RenderTargetViewDescription renderTargetViews,
const size_t  numViews 
)
overridevirtual

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.

Implements Cogs::IRenderTargets.

Definition at line 399 of file RenderTargetsGLES30.cpp.

References Cogs::Handle_t< RenderTargetTag >::InvalidHandle.

◆ createRenderTarget() [2/2]

Cogs::RenderTargetHandle Cogs::RenderTargetsGLES30::createRenderTarget ( const RenderTargetViewDescription renderTargetViews,
const size_t  numViews,
const MultiViewDescription multiView 
)
overridevirtual

Reimplemented from Cogs::IRenderTargets.

Definition at line 422 of file RenderTargetsGLES30.cpp.

◆ initialize()

void Cogs::RenderTargetsGLES30::initialize ( CapabilitiesGLES30 caps,
TexturesGLES30 textures 
)
inline

Definition at line 52 of file RenderTargetsGLES30.h.

◆ loadBlendState() [1/2]

Cogs::BlendStateHandle Cogs::RenderTargetsGLES30::loadBlendState ( const BlendState blendState)
overridevirtual

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.

Implements Cogs::IRenderTargets.

Definition at line 572 of file RenderTargetsGLES30.cpp.

◆ loadBlendState() [2/2]

Cogs::BlendStateHandle Cogs::RenderTargetsGLES30::loadBlendState ( const BlendState blendStateColor,
const BlendState blendStateAlpha 
)
overridevirtual

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.

Reimplemented from Cogs::IRenderTargets.

Definition at line 577 of file RenderTargetsGLES30.cpp.

References Cogs::BlendState::destinationBlend, Cogs::BlendState::enabled, Cogs::BlendState::operation, and Cogs::BlendState::sourceBlend.

◆ loadDepthStencilState()

Cogs::DepthStencilStateHandle Cogs::RenderTargetsGLES30::loadDepthStencilState ( const DepthStencilState depthStencilState)
overridevirtual

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.

Implements Cogs::IRenderTargets.

Definition at line 626 of file RenderTargetsGLES30.cpp.

◆ loadRasterizerState()

Cogs::RasterizerStateHandle Cogs::RenderTargetsGLES30::loadRasterizerState ( const RasterizerState rasterizerState)
overridevirtual

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.

Implements Cogs::IRenderTargets.

Definition at line 616 of file RenderTargetsGLES30.cpp.

◆ releaseBlendState()

void Cogs::RenderTargetsGLES30::releaseBlendState ( BlendStateHandle  handle)
overridevirtual

Release the blend state with the given handle.

Parameters
handleValid handle to a blend state object.

Implements Cogs::IRenderTargets.

Definition at line 611 of file RenderTargetsGLES30.cpp.

◆ releaseDepthStencilState()

void Cogs::RenderTargetsGLES30::releaseDepthStencilState ( DepthStencilStateHandle  handle)
overridevirtual

Release the depth stencil state with the given handle.

Parameters
handleValid handle to a depth stencil state object.

Implements Cogs::IRenderTargets.

Definition at line 631 of file RenderTargetsGLES30.cpp.

◆ releaseDepthStencilTarget()

void Cogs::RenderTargetsGLES30::releaseDepthStencilTarget ( DepthStencilHandle  depthStencilHandle)
overridevirtual

Release the depth target with the given depthStencilHandle.

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

Implements Cogs::IRenderTargets.

Definition at line 558 of file RenderTargetsGLES30.cpp.

◆ releaseRasterizerState()

void Cogs::RenderTargetsGLES30::releaseRasterizerState ( RasterizerStateHandle  handle)
overridevirtual

Release the rasterizer state with the given handle.

Parameters
handleValid handle to a rasterizer state object.

Implements Cogs::IRenderTargets.

Definition at line 621 of file RenderTargetsGLES30.cpp.

◆ releaseRenderTarget()

void Cogs::RenderTargetsGLES30::releaseRenderTarget ( RenderTargetHandle  renderTargetHandle)
overridevirtual

Release the render target with the given renderTargetHandle.

Parameters
renderTargetHandleValid handle to a previously created render target.

Implements Cogs::IRenderTargets.

Definition at line 548 of file RenderTargetsGLES30.cpp.

◆ releaseResources()

void Cogs::RenderTargetsGLES30::releaseResources ( )
overridevirtual

Release all allocated render target resources.

Implements Cogs::IRenderTargets.

Definition at line 636 of file RenderTargetsGLES30.cpp.

Member Data Documentation

◆ blendStates

ResourceMap<BlendStateHandle, BlendStateGLES30> Cogs::RenderTargetsGLES30::blendStates

Definition at line 79 of file RenderTargetsGLES30.h.

◆ caps

CapabilitiesGLES30* Cogs::RenderTargetsGLES30::caps = nullptr
private

Definition at line 94 of file RenderTargetsGLES30.h.

◆ depthStencils

ResourceMap<DepthStencilHandle, DepthStencilTargetGLES30> Cogs::RenderTargetsGLES30::depthStencils

Definition at line 84 of file RenderTargetsGLES30.h.

◆ depthStencilStates

ResourceMap<DepthStencilStateHandle, DepthStencilState> Cogs::RenderTargetsGLES30::depthStencilStates

Definition at line 81 of file RenderTargetsGLES30.h.

◆ rasterizerStates

ResourceMap<RasterizerStateHandle, RasterizerState> Cogs::RenderTargetsGLES30::rasterizerStates

Definition at line 80 of file RenderTargetsGLES30.h.

◆ renderTargets

ResourceMap<RenderTargetHandle, RenderTargetGLES30> Cogs::RenderTargetsGLES30::renderTargets

Definition at line 83 of file RenderTargetsGLES30.h.

◆ textures

TexturesGLES30* Cogs::RenderTargetsGLES30::textures = nullptr
private

Definition at line 93 of file RenderTargetsGLES30.h.


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