Click or drag to resize
AB4D logo

CommonStates Class

CommonStates class defines that standard BlendStates, DepthStencilStates, RasterizerState and SamplerStates.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXDXResourceBase
    Ab3d.DirectXDisposableDXResource
      Ab3d.DirectXDXDeviceResource
        Ab3d.DirectXCommonStates

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.1.9105.2048 (1.0.0.0)
Syntax
C#
public class CommonStates : DXDeviceResource

The CommonStates type exposes the following members.

Constructors
 NameDescription
Public methodCommonStatesInitializes a new instance of the CommonStates class
Top
Properties
 NameDescription
Public propertyAdditiveBlend Additive blend (used for light, fire, laser beam, lightning bolt, etc.) D.rgb := S.rgb * S.a + D.rgb * 1
Public propertyAlphaToCoverage Alpha-to-coverage blend state. See remarks for more information.
Public propertyClampSampler Gets a SamplerState that uses Clamp. Sampler filter and anisotropy count are set based on the TextureFiltering value.
Public propertyCullClockwise Gets a RasterizerState that culls clockwise oriented triangles
Public propertyCullClockwiseMultisample Gets a RasterizerState that support multisampling and culls clockwise oriented triangles
Public propertyCullCounterClockwise Gets a RasterizerState that culls counter-clockwise oriented triangles
Public propertyCullCounterClockwiseMultisample Gets a RasterizerState that support multisampling and culls counter-clockwise oriented triangles
Public propertyCullNone Gets a RasterizerState that does not cull any triangles
Public propertyCullNoneMultisample Gets a RasterizerState that support multisampling and does not cull any triangles
Public propertyDefaultBlendState Gets or sets the default BlendState - initially set to Opaque BlendState.
Public propertyDefaultDepthStencilStateObsolete.
Gets or sets the default DepthStencilState - initially set to DepthReadWrite DepthStencilState.
Public propertyDefaultOpaqueDepthStencilState Gets or sets the default DepthStencilState that is used for opaque (non-transparent) objects. Initially the value is set to DepthReadWrite DepthStencilState. .
Public propertyDefaultRasterizerState Gets or sets the default RasterizerState - initially set to CullClockwise RasterizerState.
Public propertyDefaultTransparentDepthStencilState Gets or sets the default DepthStencilState that is used for transparent objects. Initially the value is set to DepthReadWrite DepthStencilState. .
Public propertyDepthNone Gets a DepthStencilState without reading and writing to depth buffer
Public propertyDepthRead Gets a DepthStencilState with only reading and no writing to depth buffer
Public propertyDepthReadWrite Gets a DepthStencilState with reading and writing to depth buffer
Public propertyDepthWrite Gets a DepthStencilState with only writing and no reading to depth buffer
Public propertyLinearClampSampler Gets a SamplerState that uses linear (instead of anisotropic) filtering and Clamp address mode.
Public propertyLinearWrapSampler Gets a SamplerState that uses linear (instead of anisotropic) filtering and Wrap address mode.
Public propertyMirrorSampler Gets a SamplerState that uses Mirror. Sampler filter and anisotropy count are set based on the TextureFiltering value.
Public propertyMirrorXSampler Gets a SamplerState that uses Mirror for AddressU and Wrap for AddressV and AddressW. Sampler filter and anisotropy count are set based on the TextureFiltering value.
Public propertyMirrorYSampler Gets a SamplerState that uses Mirror for AddressV and Wrap for AddressU and AddressW. Sampler filter and anisotropy count are set based on the TextureFiltering value.
Public propertyNonPremultipliedAlphaBlend Alpha blend for non-pre-multiplied alpha (used for light, fire, laser beam, lightning bolt, etc.)
Public propertyOpaque Opaque blend state - blending is disabled.
Public propertyPointClampSampler Gets a SamplerState that uses point filtering (selects nearest color without any interpolation) and Clamp address mode.
Public propertyPremultipliedAdditiveBlend Additive blend for pre-multiplied alpha (used for light, fire, laser beam, lightning bolt, etc.) D.rgb := aS.rgb * 1 + D.rgb * 1
Public propertyPremultipliedAlphaBlend Alpha blend used for pre-multiplied alpha (used for normal translucent objects, opaque sprites w/ alpha mask, etc.) D.rgb := aS.rgb * 1 + D.rgb * ( 1 - S.a )
Public propertyPremultipliedSubstractiveBlend Substractive blend for pre-multiplied alpha (used for shadows, "negative lights", etc.) D.rgb := D.rgb * 1 - aS.rgb * 1
Public propertyRenderOnlyHiddenObjects Gets a DepthStencilState that will render only objects that are behind other objects (renders only "hidden" objects).
Public propertyTextureFiltering Gets or sets an TextureFilteringTypes enum that specifies what sampler filter will be used to sample textures. Note that the TextureFiltering property cannot be changed after some sampler states have already been used.
Public propertyTransparentBorderColorSampler Gets a SamplerState that uses Border and sets the border color to transparent color (0, 0, 0, 0). Sampler filter and anisotropy count are set based on the TextureFiltering value.
Public propertyWireframeCullClockwise Gets a RasterizerState that renders the objects with wireframe and culls clockwise oriented triangles
Public propertyWireframeCullCounterClockwise Gets a RasterizerState that renders the objects with wireframe and culls counter-clockwise oriented triangles
Public propertyWireframeCullNone Gets a RasterizerState that renders the objects with wireframe and does not cull any triangles
Public propertyWireframeMultisampleCullClockwise Gets a RasterizerState that renders the objects with wireframe with multisampling and culls clockwise oriented triangles
Public propertyWireframeMultisampleCullCounterClockwise Gets a RasterizerState that renders the objects with wireframe with multisampling and culls counter-clockwise oriented triangles
Public propertyWireframeMultisampleCullNone Gets a RasterizerState that renders the objects with wireframe with multisampling and does not cull any triangles
Public propertyWrapSampler Gets a SamplerState that uses Wrap. Sampler filter and anisotropy count are set based on the TextureFiltering value.
Top
Methods
 NameDescription
Public methodGetRecommendedBlendState Returns a recommended BlendState based on the hasTransparency and hasPreMultipliedAlpha parameters.
Top
See Also