PixelLightAPI
.
|
Render states. More...
#include <Types.h>
Public Types | |
enum | Enum { FillMode = 0, CullMode = 1, ZEnable = 2, ZWriteEnable = 3, ZFunc = 4, ZBias = 5, SlopeScaleDepthBias = 6, DepthBias = 7, BlendEnable = 8, SrcBlendFunc = 9, DstBlendFunc = 10, StencilEnable = 11, StencilFunc = 12, StencilRef = 13, StencilMask = 14, StencilFail = 15, StencilZFail = 16, StencilPass = 17, TwoSidedStencilMode = 18, CCWStencilFunc = 19, CCWStencilFail = 20, CCWStencilZFail = 21, CCWStencilPass = 22, PointSize = 23, PointScaleEnable = 24, PointSizeMin = 25, PointSizeMax = 26, PointScaleA = 27, PointScaleB = 28, PointScaleC = 29, LineWidth = 30, TessellationFactor = 31, TessellationMode = 32, PointSpriteEnable = 33, DitherEnable = 34, ScissorTestEnable = 35, MultisampleEnable = 36, InvCullMode = 37, FixedFillMode = 38, Number = 39, Unknown = 40 } |
Render states.
FillMode |
Fill mode (see Fill, default: Fill::Solid) |
CullMode |
Cull mode (see Cull, RenderState::InvCullMode, default: Cull::CCW) |
ZEnable |
Enable/disable z buffer test (false/true, default: true) |
ZWriteEnable |
Enable/disable z buffer writing (false/true, default: true) |
ZFunc |
Z buffer function (see Compare, default: Compare::LessEqual) |
ZBias |
Z bias/polygon offset factor, < 0 = towards camera (float to PLCore::uint32 example PLCore::Tools::FloatToUInt32(-0.001f), default: 0) Because RenderState::SlopeScaleDepthBias and RenderState::DepthBias below are API and GPU dependent, their results are NOT the same on each system & API. Whenever possible, do NOT use this 'classic' render states, use RenderState::ZBias instead. If this state is not null, the renderer will automatically manipulate the internal projection matrix to perform an 'z bias' which is more predictable as the 'classic' polygon offset. |
SlopeScaleDepthBias |
Slope scale bias/polygon offset factor, try to avoid using this -> see ZBias (float to PLCore::uint32 example PLCore::Tools::FloatToUInt32(-1.0f), default: 0) |
DepthBias |
Depth bias/polygon offset units, try to avoid using this -> see ZBias (float to PLCore::uint32 example PLCore::Tools::FloatToUInt32(-2.0f), default: 0) |
BlendEnable |
Enable/disable blending (false/true, default: false) |
SrcBlendFunc |
Source blend function (see BlendFunc, default: BlendFunc::SrcAlpha) |
DstBlendFunc |
Destination blend function (see BlendFunc, default: BlendFunc::InvSrcAlpha) |
StencilEnable |
Enable/disable stencil test (false/true, default: false) |
StencilFunc |
Stencil test passes if ((ref & mask) stencilfn (stencil & mask)) is true (see Compare, default: Compare::Always) |
StencilRef |
Reference value used in stencil test (PLCore::uint32, default: 0) |
StencilMask |
Mask value used in stencil test (PLCore::uint32, default: 0xFFFFFFFF) |
StencilFail |
Operation to perform if stencil test fails (StencilOp, default: StencilOp::Keep) |
StencilZFail |
Operation to perform if stencil test passes and Z test fails (StencilOp, default: StencilOp::Keep) |
StencilPass |
Operation to perform if both stencil and Z tests pass (StencilOp, default: StencilOp::Keep) |
TwoSidedStencilMode |
Enable/disable 2 sided stenciling (false/true, default: false, requires Capabilities::bTwoSidedStencils) If the triangle winding order is clockwise, the Stencil* operations will be used. If the winding order is counterclockwise, the CCWStencil* operations will be used. |
CCWStencilFunc |
Stencil test passes if ((ref & mask) stencilfn (stencil & mask)) is true (see Compare, default: Compare::Always, requires Capabilities::bTwoSidedStencils) |
CCWStencilFail |
Operation to perform if ccw stencil test fails (StencilOp, default: StencilOp::Keep, requires Capabilities::bTwoSidedStencils) |
CCWStencilZFail |
Operation to perform if ccw stencil test passes and Z test fails (StencilOp, default: StencilOp::Keep, requires Capabilities::bTwoSidedStencils) |
CCWStencilPass |
Operation to perform if both ccw stencil and Z tests pass (StencilOp, default: StencilOp::Keep, requires Capabilities::bTwoSidedStencils) |
PointSize |
Point size when it is not specified for each vertex. (float, default: 1.0) This value is in screen space units if RenderState::PointScaleEnable is false; otherwise this value is in world space units. |
PointScaleEnable |
Controls computation of size for point primitives. (false/true, default: false) When true, the point size is interpreted as a camera space value and is scaled by the distance function and the frustum to viewport y-axis scaling to compute the final screen-space point size. When false, the point size is interpreted as screen space and used directly. |
PointSizeMin |
Minimum size of point primitives (float, default: 1.0, requires Capabilities::bPointParameters) |
PointSizeMax |
Maximum size of point primitives, must be greater than or equal to PointSizeMin (float, default: 64.0, requires Capabilities::bPointParameters) |
PointScaleA |
Controls for distance-based size attenuation for point primitives (float, default: 1.0, requires Capabilities::bPointParameters) |
PointScaleB |
Controls for distance-based size attenuation for point primitives (float, default: 0.0, requires Capabilities::bPointParameters) |
PointScaleC |
Controls for distance-based size attenuation for point primitives (float, default: 0.0, requires Capabilities::bPointParameters) |
LineWidth |
Line width (float, default: 1.0) |
TessellationFactor |
Tessellation factor (1-Capabilities::nMaxTessellationFactor inclusive, default: 1, requires Capabilities::nMaxTessellationFactor > 1) |
TessellationMode |
Tessellation mode (default: TessellationMode::Discrete, requires Capabilities::nMaxTessellationFactor > 1) |
PointSpriteEnable |
When true, use point texture mapping (false/true, default: false, requires Capabilities::bPointSprite) |
DitherEnable |
Enable/disable dithering (false/true, default: false) |
ScissorTestEnable |
Enable/disable the scissor test (false/true, default: false) |
MultisampleEnable |
When true, perform multisample (false/true, default: true, requires Capabilities::nMultisampleAntialiasingSamples > 1, usually set automatically by the surfaces) |
InvCullMode |
Inverse cull mode active? RenderState::CullMode isn't touched only the intern API setting is inverted! (false/true, default: false) |
FixedFillMode |
General fill mode which is normally set once. If this isn't Fill::Unknown this fill mode will be used instead of RenderState::FillMode (see Fill, default: Fill::Unknown) |
Number |
Number of render states |
Unknown |
Unknown render state |
|