using System;
using System.Collections.Generic;
using System.Text;
using SlimDX.Direct3D9;
namespace Tsukikage.GameSDK.Direct3D
{
///
/// 描画の諸設定。
/// Render states define set-up states for all kinds of vertex and pixel processing.
/// Some render states set up vertex processing, and some set up pixel processing.
/// Render states can be saved and restored using stateblocks.
/// Applications use the methods of the StateBlock class to encapsulate render states.
///
public sealed class RenderStateManager
{
Device device;
internal RenderStateManager(Device device)
{
this.device = device;
}
///
/// A floating point value that specifies the amount to adaptively tessellate, in the W direction.
/// The default value is 1.0f.
///
public float AdaptiveTessellateW
{
get { return device.GetRenderState(RenderState.AdaptiveTessW); }
set { device.SetRenderState(RenderState.AdaptiveTessW, value); }
}
///
/// A floating point value that specifies the amount to adaptively tessellate, in the X direction.
/// The default value is 0.0f.
///
public float AdaptiveTessellateX
{
get { return device.GetRenderState(RenderState.AdaptiveTessX); }
set { device.SetRenderState(RenderState.AdaptiveTessX, value); }
}
///
/// A floating point value that specifies the amount to adaptively tessellate, in the Y direction.
/// The default value is 0.0f.
///
public float AdaptiveTessellateY
{
get { return device.GetRenderState(RenderState.AdaptiveTessY); }
set { device.SetRenderState(RenderState.AdaptiveTessY, value); }
}
///
/// A floating point value that specifies the amount to adaptively tessellate, in the Z direction.
/// The default value is 0.0f.
///
public float AdaptiveTessellateZ
{
get { return device.GetRenderState(RenderState.AdaptiveTessZ); }
set { device.SetRenderState(RenderState.AdaptiveTessZ, value); }
}
///
/// Set this state to true to enable alpha blending, and false to disable it. The default
/// value is false.
///
public bool AlphaBlendEnable
{
get { return device.GetRenderState(RenderState.AlphaBlendEnable); }
set { device.SetRenderState(RenderState.AlphaBlendEnable, value); }
}
///
/// Specifies the operation to perform for separate alpha blending. Use values from
/// to set this state. The default value is .Add.
///
public BlendOperation AlphaBlendOperation
{
get { return device.GetRenderState(RenderState.BlendOperationAlpha); }
set { device.SetRenderState(RenderState.BlendOperationAlpha, value); }
}
///
/// Specifies the destination alpha blending function. Use values from to set this state.
/// The default value is .Zero.
///
public Blend AlphaDestinationBlend
{
get { return device.GetRenderState(RenderState.DestinationBlendAlpha); }
set { device.SetRenderState(RenderState.DestinationBlendAlpha, value); }
}
///
/// Specifies the current alpha testing function. Use values from to
/// set this state. The default value is .Always.
///
public Compare AlphaFunction
{
get { return device.GetRenderState(RenderState.AlphaFunc); }
set { device.SetRenderState(RenderState.AlphaFunc, value); }
}
///
/// Specifies the source alpha blending function. Use values from to set this state.
/// The default value is .One.
///
public Blend AlphaSourceBlend
{
get { return device.GetRenderState(RenderState.SourceBlendAlpha); }
set { device.SetRenderState(RenderState.SourceBlendAlpha, value); }
}
///
/// Set this state to true to enable alpha testing, and false to disable it. The
/// default value is false.
///
public bool AlphaTestEnable
{
get { return device.GetRenderState(RenderState.AlphaTestEnable); }
set { device.SetRenderState(RenderState.AlphaTestEnable, value); }
}
///
/// Specifies the ambient light color. Use integer color values to set this state. The default value
/// is 0 (black).
///
public int Ambient
{
get { return device.GetRenderState(RenderState.Ambient); }
set { device.SetRenderState(RenderState.Ambient, value); }
}
///
/// Specifies the ambient light color. Use integer color values to set this state. The default value
/// is 0 (black).
///
public int AmbientColor
{
get { return device.GetRenderState(RenderState.Ambient); }
set { device.SetRenderState(RenderState.Ambient, value); }
}
///
/// Specifies the source for ambient colors. Use values from to set
/// this state. The default value is .Material.
///
public ColorSource AmbientMaterialSource
{
get { return device.GetRenderState(RenderState.AmbientMaterialSource); }
set { device.SetRenderState(RenderState.AmbientMaterialSource, value); }
}
///
/// Set this state to true to enable antialiased lines, and false
/// to disable them. The default value is false.
///
public bool AntiAliasedLineEnable
{
get { return device.GetRenderState(RenderState.AntialiasedLineEnable); }
set { device.SetRenderState(RenderState.AntialiasedLineEnable, value); }
}
///
/// Specifies a color to use as a constant blend factor for alpha blending. Use integer color values
/// to set this state. The default value is 0xFFFFFFFF (white).
///
public int BlendFactor
{
get { return device.GetRenderState(RenderState.BlendFactor); }
set { device.SetRenderState(RenderState.BlendFactor, value); }
}
///
/// Specifies a color to use as a constant blend factor for alpha blending. Use integer color values
/// to set this state. The default value is 0xFFFFFFFF (white).
///
public int BlendFactorColor
{
get { return device.GetRenderState(RenderState.BlendFactor); }
set { device.SetRenderState(RenderState.BlendFactor, value); }
}
///
/// Specifies the blending operation to use when alpha blending is enabled. Use values from
/// to set this state. The default value is .Add".
///
public BlendOperation BlendOperation
{
get { return device.GetRenderState(RenderState.BlendOperation); }
set { device.SetRenderState(RenderState.BlendOperation, value); }
}
///
/// Set this state to true to enable primitive clipping, and false
/// to disable it. The default value is true.
///
public bool Clipping
{
get { return device.GetRenderState(RenderState.Clipping); }
set { device.SetRenderState(RenderState.Clipping, value); }
}
///
/// Set this state to true to enable colored vertices, and false
/// to disable them. The default value is true.
///
public bool ColorVertex
{
get { return device.GetRenderState(RenderState.ColorVertex); }
set { device.SetRenderState(RenderState.ColorVertex, value); }
}
///
/// Specifies the current color write state of the device. Use values from
/// to set this state. The default value is .All".
///
public ColorWriteEnable ColorWriteEnable
{
get { return device.GetRenderState(RenderState.ColorWriteEnable); }
set { device.SetRenderState(RenderState.ColorWriteEnable, value); }
}
///
/// Specifies additional color write enable settings for the device. Use values from
/// to set this state. The default value is .All".
///
public ColorWriteEnable ColorWriteEnable1
{
get { return device.GetRenderState(RenderState.ColorWriteEnable1); }
set { device.SetRenderState(RenderState.ColorWriteEnable1, value); }
}
///
/// Specifies additional color write enable settings for the device. Use values from
/// to set this state. The default value is .All".
///
public ColorWriteEnable ColorWriteEnable2
{
get { return device.GetRenderState(RenderState.ColorWriteEnable2); }
set { device.SetRenderState(RenderState.ColorWriteEnable2, value); }
}
///
/// Specifies additional color write enable settings for the device. Use values from
/// to set this state. The default value is .All".
///
public ColorWriteEnable ColorWriteEnable3
{
get { return device.GetRenderState(RenderState.ColorWriteEnable3); }
set { device.SetRenderState(RenderState.ColorWriteEnable3, value); }
}
///
/// Specifies the operation to perform if the stencil test fails. Use values from
/// to set the state. The default value is .Keep".
///
public StencilOperation CounterClockwiseStencilFail
{
get { return device.GetRenderState(RenderState.CcwStencilFail); }
set { device.SetRenderState(RenderState.CcwStencilFail, value); }
}
///
/// Specifies the comparison function for stencil tests.. Use values from
/// to set the state. The default value is .Always".
///
public Compare CounterClockwiseStencilFunction
{
get { return device.GetRenderState(RenderState.CcwStencilFunc); }
set { device.SetRenderState(RenderState.CcwStencilFunc, value); }
}
///
/// Specifies the operation to perform if both the stencil and depth tests pass. Use values from
/// to set the state. The default value is .Keep".
///
public StencilOperation CounterClockwiseStencilPass
{
get { return device.GetRenderState(RenderState.CcwStencilPass); }
set { device.SetRenderState(RenderState.CcwStencilPass, value); }
}
///
/// Specifies the operation to perform if the stencil test passes and depth test fails. Use values from
/// to set the state. The default value is .Keep".
///
public StencilOperation CounterClockwiseStencilZBufferFail
{
get { return device.GetRenderState(RenderState.CcwStencilZFail); }
set { device.SetRenderState(RenderState.CcwStencilZFail, value); }
}
///
/// Specifies how back-facing triangles are culled. Use values from to
/// set this state. The default value is .Counterclockwise.
///
public Cull CullMode
{
get { return device.GetRenderState(RenderState.CullMode); }
set { device.SetRenderState(RenderState.CullMode, value); }
}
///
/// Specifies the current debug monitor token. Use values from to
/// set this state. The default value is .Enable".
///
public DebugMonitorTokens DebugMonitorTokenEnabled
{
get { return device.GetRenderState(RenderState.DebugMonitorToken); }
set { device.SetRenderState(RenderState.DebugMonitorToken, value); }
}
///
/// A floating point value that is used for comparison of depth values.
///
public float DepthBias
{
get { return device.GetRenderState(RenderState.DepthBias); }
set { device.SetRenderState(RenderState.DepthBias, value); }
}
///
/// Defines the current destination blending mode of the device. Use values from to
/// set this state. The default value is .Zero.
///
public Blend DestinationBlend
{
get { return device.GetRenderState(RenderState.DestinationBlend); }
set { device.SetRenderState(RenderState.DestinationBlend, value); }
}
///
/// Specifies the source for diffuse colors. Use values from to set
/// this state. The default value is .Color1.
///
public ColorSource DiffuseMaterialSource
{
get { return device.GetRenderState(RenderState.DiffuseMaterialSource); }
set { device.SetRenderState(RenderState.DiffuseMaterialSource, value); }
}
///
/// Set this state to true to enable dithering, and false to disable it. The default
/// value is false.
///
public bool DitherEnable
{
get { return device.GetRenderState(RenderState.DitherEnable); }
set { device.SetRenderState(RenderState.DitherEnable, value); }
}
///
/// Specifies the source for emissive colors. Use values from to set
/// this state. The default value is .Material.
///
public ColorSource EmissiveMaterialSource
{
get { return device.GetRenderState(RenderState.EmissiveMaterialSource); }
set { device.SetRenderState(RenderState.EmissiveMaterialSource, value); }
}
///
/// Set this state to true to enable adaptive tessellation, and false
/// to disable it. The default value is false.
///
public bool EnableAdaptiveTessellation
{
get { return device.GetRenderState(RenderState.EnableAdaptiveTessellation); }
set { device.SetRenderState(RenderState.EnableAdaptiveTessellation, value); }
}
///
/// Defines the current fill mode of the device. Use values from to set this state.
/// The default value is .Solid.
///
public FillMode FillMode
{
get { return device.GetRenderState(RenderState.FillMode); }
set { device.SetRenderState(RenderState.FillMode, value); }
}
///
/// Specifies current fog color. Use integer color values to set this state. The default value is
/// 0 (black).
///
public int FogColor
{
get { return device.GetRenderState(RenderState.FogColor); }
set { device.SetRenderState(RenderState.FogColor, value); }
}
///
/// Specifies current fog color. Use integer color values to set this state. The default value is
/// 0 (black).
///
public int FogColorValue
{
get { return device.GetRenderState(RenderState.FogColor); }
set { device.SetRenderState(RenderState.FogColor, value); }
}
///
/// A floating point value that defines the density of fog used in exponential fog modes.
/// The default value is 1.0f.
///
public float FogDensity
{
get { return device.GetRenderState(RenderState.FogDensity); }
set { device.SetRenderState(RenderState.FogDensity, value); }
}
///
/// Set this state to true to enable fog blending, and false to disable it. The default
/// value is false.
///
public bool FogEnable
{
get { return device.GetRenderState(RenderState.FogEnable); }
set { device.SetRenderState(RenderState.FogEnable, value); }
}
///
/// A floating point value that defines the depth at which pixel or vertex fog effects end.
/// The default value is 1.0f.
///
public float FogEnd
{
get { return device.GetRenderState(RenderState.FogEnd); }
set { device.SetRenderState(RenderState.FogEnd, value); }
}
///
/// A floating point value that defines the depth at which pixel or vertex fog effects begin.
/// The default value is 0.0f.
///
public float FogStart
{
get { return device.GetRenderState(RenderState.FogStart); }
set { device.SetRenderState(RenderState.FogStart, value); }
}
///
/// Specifies the current fog formula to be used for pixel fog. Use values from
/// to set this state. The default value is .None.
///
public FogMode FogTableMode
{
get { return device.GetRenderState(RenderState.FogTableMode); }
set { device.SetRenderState(RenderState.FogTableMode, value); }
}
///
/// Specifies the current fog formula to be used for vertex fog. Use values from
/// to set this state. The default value is .None.
///
public FogMode FogVertexMode
{
get { return device.GetRenderState(RenderState.FogVertexMode); }
set { device.SetRenderState(RenderState.FogVertexMode, value); }
}
///
/// Set this state to true to enable indexed vertex blending, and false
/// to disable it. The default value is false.
///
public bool IndexedVertexBlendEnable
{
get { return device.GetRenderState(RenderState.IndexedVertexBlendEnable); }
set { device.SetRenderState(RenderState.IndexedVertexBlendEnable, value); }
}
///
/// Set this state to true to enable drawing of the last pixel in a line, and false
/// to disable it. The default value is true.
///
public bool LastPixel
{
get { return device.GetRenderState(RenderState.LastPixel); }
set { device.SetRenderState(RenderState.LastPixel, value); }
}
///
/// Set this state to true to enable lighting, and false
/// to disable it. The default value is true.
///
public bool Lighting
{
get { return device.GetRenderState(RenderState.Lighting); }
set { device.SetRenderState(RenderState.Lighting, value); }
}
///
/// Set this state to true to enable camera-relative specular highlights, and false
/// to use orthogonal specular highlights. The default value is true.
///
public bool LocalViewer
{
get { return device.GetRenderState(RenderState.LocalViewer); }
set { device.SetRenderState(RenderState.LocalViewer, value); }
}
///
/// A floating point value that specifies the maximum tessellation level. The default value is 1.0f.
///
public float MaxTessellationLevel
{
get { return device.GetRenderState(RenderState.MaxTessellationLevel); }
set { device.SetRenderState(RenderState.MaxTessellationLevel, value); }
}
///
/// A floating point value that specifies the minium tessellation level. The default value is 1.0f.
///
public float MinTessellationLevel
{
get { return device.GetRenderState(RenderState.MinTessellationLevel); }
set { device.SetRenderState(RenderState.MinTessellationLevel, value); }
}
///
/// Set this state to true to enable point multisampling, and false
/// to disable it. The default value is false.
///
public bool MultiSampleAntiAlias
{
get { return device.GetRenderState(RenderState.MultisampleAntialias); }
set { device.SetRenderState(RenderState.MultisampleAntialias, value); }
}
///
/// An integer mask that controls the samples in a multisampling render target.
///
public int MultiSampleMask
{
get { return device.GetRenderState(RenderState.MultisampleMask); }
set { device.SetRenderState(RenderState.MultisampleMask, value); }
}
///
/// Specifies the N-patch normal interpolation degree. Use values from to
/// set this state. The default value is .Linear".
///
public Degree NormalDegree
{
get { return device.GetRenderState(RenderState.NormalDegree); }
set { device.SetRenderState(RenderState.NormalDegree, value); }
}
///
/// Set this state to true to enable automatic normalization of vertex normals, and false
/// to disable it. The default value is false.
///
public bool NormalizeNormals
{
get { return device.GetRenderState(RenderState.NormalizeNormals); }
set { device.SetRenderState(RenderState.NormalizeNormals, value); }
}
///
/// Specifies the current patch edge style. Use values from to
/// set this state. The default value is .Discrete".
///
public PatchEdgeStyle PatchEdgeStyle
{
get { return device.GetRenderState(RenderState.PatchEdgeStyle); }
set { device.SetRenderState(RenderState.PatchEdgeStyle, value); }
}
///
/// A floating point value that specifies attenuation when point scaling is applied. The default
/// value is 1.0f.
///
public float PointScaleA
{
get { return device.GetRenderState(RenderState.PointScaleA); }
set { device.SetRenderState(RenderState.PointScaleA, value); }
}
///
/// A floating point value that specifies attenuation when point scaling is applied. The default
/// value is 0.0f.
///
public float PointScaleB
{
get { return device.GetRenderState(RenderState.PointScaleB); }
set { device.SetRenderState(RenderState.PointScaleB, value); }
}
///
/// A floating point value that specifies attenuation when point scaling is applied. The default
/// value is 0.0f.
///
public float PointScaleC
{
get { return device.GetRenderState(RenderState.PointScaleC); }
set { device.SetRenderState(RenderState.PointScaleC, value); }
}
///
/// Set this state to true to enable point scaling, and false
/// to disable it. The default value is false.
///
public bool PointScaleEnable
{
get { return device.GetRenderState(RenderState.PointScaleEnable); }
set { device.SetRenderState(RenderState.PointScaleEnable, value); }
}
///
/// A floating point value that specifies the size of points.
///
public float PointSize
{
get { return device.GetRenderState(RenderState.PointSize); }
set { device.SetRenderState(RenderState.PointSize, value); }
}
///
/// A floating point value that specifies the maximum size of point primitives.
///
public float PointSizeMax
{
get { return device.GetRenderState(RenderState.PointSizeMax); }
set { device.SetRenderState(RenderState.PointSizeMax, value); }
}
///
/// A floating point value that specifies the minimum size of point primitives.
///
public float PointSizeMin
{
get { return device.GetRenderState(RenderState.PointSizeMin); }
set { device.SetRenderState(RenderState.PointSizeMin, value); }
}
///
/// Set this state to true to enable point sprites, and false
/// to disable them. The default value is false.
///
public bool PointSpriteEnable
{
get { return device.GetRenderState(RenderState.PointSpriteEnable); }
set { device.SetRenderState(RenderState.PointSpriteEnable, value); }
}
///
/// Specifies the N-patch position interpolation degree. Use values from to
/// set this state. The default value is .Cubic".
///
public Degree PositionDegree
{
get { return device.GetRenderState(RenderState.PositionDegree); }
set { device.SetRenderState(RenderState.PositionDegree, value); }
}
///
/// Set this state to true to enable range based fog, and false to use depth based fog.
/// The default value is false.
///
public bool RangeFogEnable
{
get { return device.GetRenderState(RenderState.RangeFogEnable); }
set { device.SetRenderState(RenderState.RangeFogEnable, value); }
}
///
/// An integer value that specifies the reference alpha against which pixels are tested when
/// alpha blending is enabled. The default value is 0.
///
public int ReferenceAlpha
{
get { return device.GetRenderState(RenderState.AlphaRef); }
set { device.SetRenderState(RenderState.AlphaRef, value); }
}
///
/// An integer value that specifies the reference value against which pixels are tested when
/// stencil testing is enabled. The default value is 0.
///
public int ReferenceStencil
{
get { return device.GetRenderState(RenderState.StencilRef); }
set { device.SetRenderState(RenderState.StencilRef, value); }
}
///
/// Set this state to true to enable scissor testing, and false
/// to disable it. The default value is false.
///
public bool ScissorTestEnable
{
get { return device.GetRenderState(RenderState.ScissorTestEnable); }
set { device.SetRenderState(RenderState.ScissorTestEnable, value); }
}
///
/// Set this state to true to enable separate blending modes for the alpha channel, and false
/// to disable them. The default value is false.
///
public bool SeparateAlphaBlendEnabled
{
get { return device.GetRenderState(RenderState.SeparateAlphaBlendEnable); }
set { device.SetRenderState(RenderState.SeparateAlphaBlendEnable, value); }
}
///
/// Defines the current shade mode of the device. Use values from to set this state.
/// The default value is .Gouraud.
///
public ShadeMode ShadeMode
{
get { return device.GetRenderState(RenderState.ShadeMode); }
set { device.SetRenderState(RenderState.ShadeMode, value); }
}
/// An integer value that specifies how much bias can be applied to co-planar primitives to reduce Z-fighting. The default value is 0.
public float SlopeScaleDepthBias
{
get { return device.GetRenderState(RenderState.SlopeScaleDepthBias); }
set { device.SetRenderState(RenderState.SlopeScaleDepthBias, value); }
}
///
/// Defines the current source blending mode of the device. Use values from to
/// set this state. The default value is .One.
///
public Blend SourceBlend
{
get { return device.GetRenderState(RenderState.SourceBlend); }
set { device.SetRenderState(RenderState.SourceBlend, value); }
}
///
/// Set this state to true to enable specular highlights, and false to disable them.
/// The default value is false.
///
public bool SpecularEnable
{
get { return device.GetRenderState(RenderState.SpecularEnable); }
set { device.SetRenderState(RenderState.SpecularEnable, value); }
}
///
/// Specifies the source for specular colors. Use values from to set
/// this state. The default value is .Color2.
///
public ColorSource SpecularMaterialSource
{
get { return device.GetRenderState(RenderState.SpecularMaterialSource); }
set { device.SetRenderState(RenderState.SpecularMaterialSource, value); }
}
///
/// Set this state to true to enable sRGB gamma correction, and false
/// to disable it. The default value is false.
///
public bool SrgbWriteEnable
{
get { return device.GetRenderState(RenderState.SrgbWriteEnable); }
set { device.SetRenderState(RenderState.SrgbWriteEnable, value); }
}
///
/// Set this state to true to enable stenciling, and false to disable it.
/// The default value is false.
///
public bool StencilEnable
{
get { return device.GetRenderState(RenderState.StencilEnable); }
set { device.SetRenderState(RenderState.StencilEnable, value); }
}
///
/// Specifies the stencil operation to perform if the stencil test fails. Use values from
/// to set this state. The default value is .Keep.
///
public StencilOperation StencilFail
{
get { return device.GetRenderState(RenderState.StencilFail); }
set { device.SetRenderState(RenderState.StencilFail, value); }
}
///
/// Specifies the comparison function for stencil tests. Use values from
/// to set this state. The default value is .Always.
///
public Compare StencilFunction
{
get { return device.GetRenderState(RenderState.StencilFunc); }
set { device.SetRenderState(RenderState.StencilFunc, value); }
}
///
/// An integer value that specifies the mask for stencil values. The default value is 0xFFFFFFFF.
///
public int StencilMask
{
get { return device.GetRenderState(RenderState.StencilMask); }
set { device.SetRenderState(RenderState.StencilMask, value); }
}
///
/// Specifies the stencil operation to perform if both the stencil and depth tests pass. Use values from
/// to set this state. The default value is .Keep.
///
public StencilOperation StencilPass
{
get { return device.GetRenderState(RenderState.StencilPass); }
set { device.SetRenderState(RenderState.StencilPass, value); }
}
///
/// An integer value that specifies the write mask used for values written into the stencil buffer.
/// The default value is 0xFFFFFFFF.
///
public int StencilWriteMask
{
get { return device.GetRenderState(RenderState.StencilWriteMask); }
set { device.SetRenderState(RenderState.StencilWriteMask, value); }
}
///
/// Specifies the stencil operation to perform if the stencil test passes and the depth test fails.
/// Use values from to set this state. The default value is
/// .Keep.
///
public StencilOperation StencilZBufferFail
{
get { return device.GetRenderState(RenderState.StencilZFail); }
set { device.SetRenderState(RenderState.StencilZFail, value); }
}
///
/// Specifies the color used for multiple texture blending. Use integer color values to set this
/// state. The default value is 0xFFFFFFFF (white).
///
public int TextureFactor
{
get { return device.GetRenderState(RenderState.TextureFactor); }
set { device.SetRenderState(RenderState.TextureFactor, value); }
}
///
/// A floating point value that specifies the tweening factor. The default value is 0.0f.
///
public float TweenFactor
{
get { return device.GetRenderState(RenderState.TweenFactor); }
set { device.SetRenderState(RenderState.TweenFactor, value); }
}
///
/// Set this state to true to enable two sided stenciling, and false
/// to disable it. The default value is false.
///
public bool TwoSidedStencilMode
{
get { return device.GetRenderState(RenderState.TwoSidedStencilMode); }
set { device.SetRenderState(RenderState.TwoSidedStencilMode, value); }
}
///// Enables or disables w-buffering.
//public bool UseWBuffer
//{
// get { }
// set { }
//}
///
/// An integer value that specifies the number of matrices to use to perform geometry blending.
/// Use values from to set this state. The default value is
/// .Disable.
///
public VertexBlend VertexBlend
{
get { return device.GetRenderState(RenderState.VertexBlend); }
set { device.SetRenderState(RenderState.VertexBlend, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap0
{
get { return device.GetRenderState(RenderState.Wrap0); }
set { device.SetRenderState(RenderState.Wrap0, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap1
{
get { return device.GetRenderState(RenderState.Wrap1); }
set { device.SetRenderState(RenderState.Wrap1, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap10
{
get { return device.GetRenderState(RenderState.Wrap10); }
set { device.SetRenderState(RenderState.Wrap10, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap11
{
get { return device.GetRenderState(RenderState.Wrap11); }
set { device.SetRenderState(RenderState.Wrap11, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap12
{
get { return device.GetRenderState(RenderState.Wrap12); }
set { device.SetRenderState(RenderState.Wrap12, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap13
{
get { return device.GetRenderState(RenderState.Wrap13); }
set { device.SetRenderState(RenderState.Wrap13, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap14
{
get { return device.GetRenderState(RenderState.Wrap14); }
set { device.SetRenderState(RenderState.Wrap14, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap15
{
get { return device.GetRenderState(RenderState.Wrap15); }
set { device.SetRenderState(RenderState.Wrap15, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap2
{
get { return device.GetRenderState(RenderState.Wrap2); }
set { device.SetRenderState(RenderState.Wrap2, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap3
{
get { return device.GetRenderState(RenderState.Wrap3); }
set { device.SetRenderState(RenderState.Wrap3, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap4
{
get { return device.GetRenderState(RenderState.Wrap4); }
set { device.SetRenderState(RenderState.Wrap4, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap5
{
get { return device.GetRenderState(RenderState.Wrap5); }
set { device.SetRenderState(RenderState.Wrap5, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap6
{
get { return device.GetRenderState(RenderState.Wrap6); }
set { device.SetRenderState(RenderState.Wrap6, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap7
{
get { return device.GetRenderState(RenderState.Wrap7); }
set { device.SetRenderState(RenderState.Wrap7, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap8
{
get { return device.GetRenderState(RenderState.Wrap8); }
set { device.SetRenderState(RenderState.Wrap8, value); }
}
///
/// Texture wrapping behavior for multiple sets of texture coordinates. Use values from
/// to set this state. The default value for this state is .None.
///
public TextureWrapping Wrap9
{
get { return device.GetRenderState(RenderState.Wrap9); }
set { device.SetRenderState(RenderState.Wrap9, value); }
}
///
/// Depth-buffering state. Use values from to set this state. The
/// default value for this state is .UseZBuffer if a depth stencil was created
/// along with the device, or .DontUseZBuffer otherwise.
///
public ZBufferType ZBufferEnable
{
get { return device.GetRenderState(RenderState.ZEnable); }
set { device.SetRenderState(RenderState.ZEnable, value); }
}
///
/// Specifies the current depth testing function. Use values from to
/// set this state. The default value is .LessEqual.
///
public Compare ZBufferFunction
{
get { return device.GetRenderState(RenderState.ZFunc); }
set { device.SetRenderState(RenderState.ZFunc, value); }
}
///
/// Set this state to true to enable writes to the depth buffer, and false to disable
/// them. The default value is true.
///
public bool ZBufferWriteEnable
{
get { return device.GetRenderState(RenderState.ZWriteEnable); }
set { device.SetRenderState(RenderState.ZWriteEnable, value); }
}
private class StateBlockImpl : StateBlock { public StateBlockImpl(Device device) : base(device) { } }
///
/// Render states define set-up states for all kinds of vertex and pixel processing.
/// Some render states set up vertex processing, and some set up pixel processing.
/// Render states can be saved and restored using stateblocks.
/// Applications use the methods of the StateBlock class to encapsulate render states.
///
public StateBlock StateBlock() { return new StateBlockImpl(device); }
}
///
/// Applications use the methods of the StateBlock class to encapsulate render states.
///
public class StateBlock : SlimDX.Direct3D9.StateBlock { protected StateBlock(Device device) : base(device, StateBlockType.All) { } }
}