This reference page is linked to from the following overview topics: Nitrous Graphics SDK Extensions.
#include <RenderStates.h>
This class encapsulates a complete rasterizer state, like fill mode, cull mode, point size, etc.
Classes |
|
union | DepthBias |
The z buffer depth bias value Default value
is 0.
More... |
|
Public Member Functions |
|
RasterizerState () | |
virtual | ~RasterizerState () |
virtual void | SetFillMode (FillMode value) |
Set the raster fill mode. |
|
virtual FillMode | GetFillMode () const |
Get the raster fill mode /return the fill
mode. |
|
virtual void | SetCullMode (CullMode value) |
Set culling mode, front face or back face.
|
|
virtual CullMode | GetCullMode () const |
Get culling mode /return the culling mode.
|
|
virtual void | SetColorInterpolationEnable (bool value) |
Sets whether color registers are
interpolated between vertices. |
|
virtual bool | GetColorInterpolationEnable () const |
Gets whether color registers are
interpolated between vertices. |
|
virtual void | SetDepthBias (float value) |
Set z buffer depth bias value by float
/param value float depth bias. |
|
virtual void | SetDepthBias (int value) |
Set z buffer depth bias value by int /param
value int depth bias. |
|
virtual bool | IsFloatDepthBias () |
Get depth bias is float or int /return true
if using float depth bias, false if it's int. |
|
virtual float | GetDepthBiasFloat () const |
Get float depth bias /return depth bias.
|
|
virtual int | GetDepthBiasInt () const |
Get int depth bias /return depth bias.
|
|
virtual void | SetDepthBiasClamp (float value) |
Set the z buffer depth bias clamp value.
|
|
virtual float | GetDepthBiasClamp () const |
get the depth bias clamp value /return depth
bias clamp |
|
virtual void | SetSlopeScaledDepthBias (float value) |
Set the slope scaled depth bias value.
|
|
virtual float | GetSlopeScaledDepthBias () const |
Get the slope scaled depth bias value
/return slope scaled depth bias value. |
|
virtual void | SetDepthClipEnabled (bool value) |
Set if depth clipping is enabled. |
|
virtual bool | GetDepthClipEnabled () const |
Get if depth clipping is enabled /return
true if enabled, false if not. |
|
virtual void | SetScissorEnabled (bool value) |
Set scissor clipping state. |
|
virtual bool | GetScissorEnabled () const |
Get scissor clipping state. |
|
virtual void | SetMultiSampleEnabled (bool value) |
MultiSample state. |
|
virtual bool | GetMultiSampleEnabled () const |
Get MultiSample State /return true if
multi-sample enabled, false if not. |
|
virtual void | SetPointSize (float value) |
Set vertex point size. |
|
virtual float | GetPointSize () const |
Get vertex point size. |
|
Protected Attributes |
|
FillMode | mFillMode |
The raster fill mode. |
|
CullMode | mCullMode |
The culling mode, front face or back face.
|
|
bool | mColorInterpolationEnabled |
Sets whether color registers are
interpolated between vertices. |
|
bool | mIsFloatDepthBias |
The z buffer depth bias type: float or int.
|
|
float | mDepthBiasClamp |
the z buffer depth bias clamp value.
|
|
float | mSlopeScaledDepthBias |
the slope scaled depth bias value. |
|
bool | mDepthClipEnabled |
Indicate if depth clipping is enabled.
|
|
bool | mScissorEnabled |
scissor clipping state Default value is
false |
|
bool | mMultiSampleEnabled |
Multisample state Default value is false.
|
|
float | mPointSize |
Vertex point size Note this property only
works for DirectX9 device Default value is 1.0. |
|
DepthBias | mDepthBias |
RasterizerState | ( | ) |
virtual ~RasterizerState | ( | ) | [inline, virtual] |
{}
virtual void SetFillMode | ( | FillMode | value | ) | [virtual] |
Set the raster fill mode.
Default value is FillSolid /param value new mode
virtual FillMode GetFillMode | ( | ) | const [virtual] |
Get the raster fill mode /return the fill mode.
virtual void SetCullMode | ( | CullMode | value | ) | [virtual] |
Set culling mode, front face or back face.
Default value is CullModeCCW /param value new cull mode
virtual CullMode GetCullMode | ( | ) | const [virtual] |
Get culling mode /return the culling mode.
virtual void SetColorInterpolationEnable | ( | bool | value | ) | [virtual] |
Sets whether color registers are interpolated between vertices.
If disabled, this will provide flat shading for effects that use the color registers; otherwise Gouraud (smooth) shading is performed. Default value is true. /param value true to enable color interpolation, false to disable
virtual bool GetColorInterpolationEnable | ( | ) | const [virtual] |
Gets whether color registers are interpolated between vertices.
/return true if the color interpolation is enabled, false if disabled.
virtual void SetDepthBias | ( | float | value | ) | [virtual] |
Set z buffer depth bias value by float /param value float depth bias.
virtual void SetDepthBias | ( | int | value | ) | [virtual] |
Set z buffer depth bias value by int /param value int depth bias.
virtual bool IsFloatDepthBias | ( | ) | [virtual] |
Get depth bias is float or int /return true if using float depth bias, false if it's int.
virtual float GetDepthBiasFloat | ( | ) | const [virtual] |
Get float depth bias /return depth bias.
virtual int GetDepthBiasInt | ( | ) | const [virtual] |
Get int depth bias /return depth bias.
virtual void SetDepthBiasClamp | ( | float | value | ) | [virtual] |
Set the z buffer depth bias clamp value.
Default value is 0 /param value depth bias clamp
virtual float GetDepthBiasClamp | ( | ) | const [virtual] |
get the depth bias clamp value /return depth bias clamp
virtual void SetSlopeScaledDepthBias | ( | float | value | ) | [virtual] |
Set the slope scaled depth bias value.
Default value is 0 /param value scaled depth bias value
virtual float GetSlopeScaledDepthBias | ( | ) | const [virtual] |
Get the slope scaled depth bias value /return slope scaled depth bias value.
virtual void SetDepthClipEnabled | ( | bool | value | ) | [virtual] |
Set if depth clipping is enabled.
Default value is true. If enabled, depth values out of the 0-1 range are clipped. If false, the GPU will first clamp the depth value to 0-1, then clip any values where the w < 0. This is mostly used by shadow volume techniques to avoid near and far clipping problems. It could also be used by a renderer where one object is behind everything (e.g. an environment hemisphere) that would normally be clipped by the far clip plane; turning off clipping would instead clamp the z-depth of this object to 1.0 and so display it behind everything. In summary, this value should very rarely be set to false. /param value true to enable depth clipe, false to disable.
virtual bool GetDepthClipEnabled | ( | ) | const [virtual] |
Get if depth clipping is enabled /return true if enabled, false if not.
virtual void SetScissorEnabled | ( | bool | value | ) | [virtual] |
Set scissor clipping state.
Default value is false /param value true to enable scissor clipping, false to disable
virtual bool GetScissorEnabled | ( | ) | const [virtual] |
Get scissor clipping state.
/return true if scissor is enabled, false if not.
virtual void SetMultiSampleEnabled | ( | bool | value | ) | [virtual] |
MultiSample state.
Default value is false /param value true to enable multi-sample, false to disable
virtual bool GetMultiSampleEnabled | ( | ) | const [virtual] |
Get MultiSample State /return true if multi-sample enabled, false if not.
virtual void SetPointSize | ( | float | value | ) | [virtual] |
Set vertex point size.
Default value is 1.0 Note this property only works for DirectX9 device /param value the point size.
virtual float GetPointSize | ( | ) | const [virtual] |
bool
mColorInterpolationEnabled [protected] |
Sets whether color registers are interpolated between vertices.
If disabled, this will provide flat shading for effects that use the color registers; otherwise Gouraud (smooth) shading is performed. Default value is true.
bool
mIsFloatDepthBias [protected] |
float
mDepthBiasClamp [protected] |
float
mSlopeScaledDepthBias [protected] |
bool
mDepthClipEnabled [protected] |
Indicate if depth clipping is enabled.
If enabled, depth values out of the 0-1 range are clipped. If false, the GPU will first clamp the depth value to 0-1, then clip any values where the w < 0. This is mostly used by shadow volume techniques to avoid near and far clipping problems. It could also be used by a renderer where one object is behind everything (e.g. an environment hemisphere) that would normally be clipped by the far clip plane; turning off clipping would instead clamp the z-depth of this object to 1.0 and so display it behind everything. In summary, this value should very rarely be set to false.
bool
mScissorEnabled [protected] |
scissor clipping state Default value is false
bool
mMultiSampleEnabled [protected] |
Multisample state Default value is false.
float
mPointSize [protected] |
Vertex point size Note this property only works for DirectX9 device Default value is 1.0.
DepthBias
mDepthBias [protected] |