Cogs.Core
|
Encapsulates state for primitive rasterization in a state object. More...
#include <RasterizerState.h>
Public Types | |
enum | CullMode { Front = 0 , Back , None } |
Culling modes for triangle rasterization. More... | |
Static Public Member Functions | |
static RasterizerState | DefaultState () |
Constructs a rasterizer state initialized with the default values. | |
Public Attributes | |
bool | wireFrame |
If only wire frames should be rasterized. Default is false. | |
CullMode | cullMode |
Which face culling mode to apply to primitives before rasterization. | |
bool | frontCounterClockwise |
If counter clockwise polygon winding is used to specify front facing polygons. Default is false. | |
bool | multiSample |
If multisample rasterization should be enabled. Default is true. | |
float | depthBias |
Depth bias to apply to depth values after initial rasterization before depth values are written. | |
float | slopeScaledDepthBias |
Slope scaled depth bias value controlling the depth bias value based on the area of the polygon on screen. | |
float | depthBiasClamp |
Value to clamp the depth bias to so that it may not go outside desired values even when applying slope scale. | |
bool | scissor |
Enable scissor rect. | |
bool | noDepthClip = false |
Clamp depth value instead of clipping against near and depth planes. | |
Encapsulates state for primitive rasterization in a state object.
Rasterization state can be used to control several aspects of primitive rasterization, such as rendering only wire frames, polygon winding order, back face culling etc.
Definition at line 11 of file RasterizerState.h.
Culling modes for triangle rasterization.
Enumerator | |
---|---|
Front | Cull front facing primitives. |
Back | Cull back facing primitives. |
None | Do not perform any face culling. |
Definition at line 14 of file RasterizerState.h.
|
inlinestatic |
Constructs a rasterizer state initialized with the default values.
Definition at line 54 of file RasterizerState.h.
References None.
Referenced by Cogs::ContextGL20::setRasterizerState(), and Cogs::ContextGLES30::setRasterizerState().
CullMode Cogs::RasterizerState::cullMode |
Which face culling mode to apply to primitives before rasterization.
Definition at line 28 of file RasterizerState.h.
Referenced by Cogs::RenderTargetsD3D12::loadRasterizerState(), Cogs::RenderTargetsD3D11::loadRasterizerState(), Cogs::RenderTargetsVK::loadRasterizerState(), Cogs::ContextGL20::setRasterizerState(), and Cogs::ContextGLES30::setRasterizerState().
float Cogs::RasterizerState::depthBias |
Depth bias to apply to depth values after initial rasterization before depth values are written.
Definition at line 37 of file RasterizerState.h.
Referenced by Cogs::RenderTargetsD3D12::loadRasterizerState(), Cogs::RenderTargetsD3D11::loadRasterizerState(), Cogs::RenderTargetsVK::loadRasterizerState(), Cogs::ContextGL20::setRasterizerState(), and Cogs::ContextGLES30::setRasterizerState().
float Cogs::RasterizerState::depthBiasClamp |
Value to clamp the depth bias to so that it may not go outside desired values even when applying slope scale.
Definition at line 43 of file RasterizerState.h.
Referenced by Cogs::RenderTargetsD3D12::loadRasterizerState(), Cogs::RenderTargetsD3D11::loadRasterizerState(), and Cogs::RenderTargetsVK::loadRasterizerState().
bool Cogs::RasterizerState::frontCounterClockwise |
If counter clockwise polygon winding is used to specify front facing polygons. Default is false.
Definition at line 31 of file RasterizerState.h.
Referenced by Cogs::RenderTargetsD3D12::loadRasterizerState(), Cogs::RenderTargetsD3D11::loadRasterizerState(), Cogs::RenderTargetsVK::loadRasterizerState(), Cogs::ContextGL20::setRasterizerState(), and Cogs::ContextGLES30::setRasterizerState().
bool Cogs::RasterizerState::multiSample |
If multisample rasterization should be enabled. Default is true.
Definition at line 34 of file RasterizerState.h.
Referenced by Cogs::RenderTargetsD3D12::loadRasterizerState(), and Cogs::RenderTargetsD3D11::loadRasterizerState().
bool Cogs::RasterizerState::noDepthClip = false |
Clamp depth value instead of clipping against near and depth planes.
Definition at line 49 of file RasterizerState.h.
Referenced by Cogs::RenderTargetsD3D11::loadRasterizerState(), and Cogs::ContextGL20::setRasterizerState().
bool Cogs::RasterizerState::scissor |
Enable scissor rect.
Definition at line 46 of file RasterizerState.h.
Referenced by Cogs::RenderTargetsD3D11::loadRasterizerState(), Cogs::ContextGL20::setRasterizerState(), and Cogs::ContextGLES30::setRasterizerState().
float Cogs::RasterizerState::slopeScaledDepthBias |
Slope scaled depth bias value controlling the depth bias value based on the area of the polygon on screen.
Definition at line 40 of file RasterizerState.h.
Referenced by Cogs::RenderTargetsD3D12::loadRasterizerState(), Cogs::RenderTargetsD3D11::loadRasterizerState(), Cogs::RenderTargetsVK::loadRasterizerState(), Cogs::ContextGL20::setRasterizerState(), and Cogs::ContextGLES30::setRasterizerState().
bool Cogs::RasterizerState::wireFrame |
If only wire frames should be rasterized. Default is false.
Definition at line 25 of file RasterizerState.h.
Referenced by Cogs::RenderTargetsD3D12::loadRasterizerState(), Cogs::RenderTargetsD3D11::loadRasterizerState(), Cogs::RenderTargetsVK::loadRasterizerState(), Cogs::ContextGL20::setRasterizerState(), and Cogs::ContextGLES30::setRasterizerState().