Class EngineState
- Namespace
- OmegaEngine
- Assembly
- OmegaEngine.dll
Represents the current graphics render state of the Device.
public sealed class EngineState
- Inheritance
-
objectEngineState
Fields
AdditiveBlending
Value for AlphaBlend to apply additive blending (use color map)
public const int AdditiveBlending = 257
Field Value
AlphaChannel
Value for AlphaBlend to use alpha channel for transparency (augmented with alpha testing)
public const int AlphaChannel = 256
Field Value
BinaryAlphaChannel
Value for AlphaBlend to use alpha channel for binary alpha testing
public const int BinaryAlphaChannel = -256
Field Value
Invisible
Value for AlphaBlend to make something completely transparent (i.e., invisible)
public const int Invisible = 255
Field Value
Opaque
Value for AlphaBlend to use no alpha blending
public const int Opaque = 0
Field Value
Properties
AlphaBlend
The level of transparency from 0 (solid) to 255 (invisible), AlphaChannel, BinaryAlphaChannel or AdditiveBlending
public int AlphaBlend { get; set; }
Property Value
CullMode
The current culling mode used for rendering
public Cull CullMode { get; set; }
Property Value
- Cull
FfpLighting
Controls whether fixed-function pipeline lighting is used at the moment instead of SurfaceShaders
public bool FfpLighting { get; set; }
Property Value
FillMode
Controls how vertexes are filled (normal, wireframe, dotted)
public FillMode FillMode { get; set; }
Property Value
- FillMode
Fog
Shall a linear fog effect be applied?
public bool Fog { get; set; }
Property Value
FogColor
The color of the fog
public Color FogColor { get; set; }
Property Value
Remarks
Linearized on upload: fixed-function fog is applied before the sRGB conversion in the ROP (even for pixel-shader draws), so an un-linearized color would come out too bright. Must stay consistent with the background color, which is cleared with SrgbWrite turned off and therefore lands in the render target already encoded.
FogEnd
The distance at which the linear fog shall have obscured everything
public float FogEnd { get; set; }
Property Value
FogStart
The distance at which the linear fog shall start
public float FogStart { get; set; }
Property Value
ProjectionTransform
The currently active projection transformation matrix
public Matrix ProjectionTransform { get; set; }
Property Value
- Matrix
SrgbTexture
Shall the texture in the first texture stage be linearized (sRGB to linear) when sampled?
public bool SrgbTexture { get; set; }
Property Value
Remarks
Applies to color textures (diffuse, glow, skybox) in the scene pass, but not to data textures (normal, height, specular maps). Applies to sampler 0, like SetTexture(ITextureProvider?).
SrgbWrite
Shall pixels be gamma-encoded (linear to sRGB) when written to the render target?
public bool SrgbWrite { get; set; }
Property Value
Remarks
Turned on for the scene pass, where all shading arithmetic happens in linear space, and off everywhere else
(post-screen shaders, GUI, fades, depth targets), which operate on already-encoded values.
Whether Device.Clear is affected by this is hardware-dependent, so turn it off around clears
of already-encoded colors rather than relying on either behavior.
UserClipPlane
The currently active user clip plane; default SlimDX.Plane for none
public Plane UserClipPlane { get; set; }
Property Value
- Plane
Remarks
When rendering without SurfaceShaders the clip plane must be in world space. When rendering with SurfaceShaders it must be in camera space.
ViewTransform
The currently active view transformation matrix
public Matrix ViewTransform { get; set; }
Property Value
- Matrix
WorldTransform
The currently active world transformation matrix
public Matrix WorldTransform { get; set; }
Property Value
- Matrix
ZBufferMode
Controls how the ZBuffer works
public ZBufferMode ZBufferMode { get; set; }
Property Value
Methods
SetTexture(ITextureProvider?)
Sets the currently active texture for the first texture stage.
public void SetTexture(ITextureProvider? texture)
Parameters
textureITextureProviderThe object providing the texture.
Remarks
Corresponds to calling SetTexture(int, BaseTexture) with the texture stage parameter set to 0.
SetVertexBuffer(VertexBuffer)
Sets a SlimDX.Direct3D9.VertexBuffer with a fixed-function vertex format as the current active stream source.
public void SetVertexBuffer(VertexBuffer buffer)
Parameters
bufferVertexBufferThe SlimDX.Direct3D9.VertexBuffer with a fixed-function vertex format.