C# Class Axiom.RenderSystems.Xna.XnaHelper

Helper class for Xna that includes conversion functions and things that are specific to XFG.
Show file Open project: WolfgangSt/axiom Class Usage Examples

Public Methods

Method Description
Convert ( SceneBlendFactor factor ) : Microsoft.Xna.Framework.Graphics.Blend

Helper method to convert Axiom scene blend factors to Xna

Convert ( LayerBlendOperationEx blendop ) : Microsoft.Xna.Framework.Graphics.BlendFunction

Static method for converting LayerBlendOperationEx enum values to the Direct3D TextureOperation enum.

Convert ( Axiom color ) : Microsoft.Xna.Framework.Color
Convert ( Microsoft.Xna.Framework color ) : ColorEx
Convert ( Axiom mode, bool flip ) : Microsoft.Xna.Framework.Graphics.CullMode
Convert ( Axiom matrix ) : Matrix
Convert ( Axiom.Graphics.BufferUsage usage ) : Microsoft.Xna.Framework.Graphics.Axiom.Graphics.BufferUsage
Convert ( Axiom.Graphics.CompareFunction func ) : Microsoft.Xna.Framework.Graphics.Axiom.Graphics.CompareFunction

Converts our CompareFunction enum to the XFG.Compare equivalent.

Convert ( SurfaceFormat semantic ) : PixelFormat
Convert ( Axiom op ) : Microsoft.Xna.Framework.Graphics.StencilOperation

Converts the D3D ShadingMode to our Shading enum equivalent.

Convert ( Axiom op, bool invert ) : Microsoft.Xna.Framework.Graphics.StencilOperation

Converts our StencilOperation enum to the D3D StencilOperation equivalent.

Convert ( PixelFormat format ) : Microsoft.Xna.Framework.Graphics.SurfaceFormat

Convert ( TextureAddressing type ) : Microsoft.Xna.Framework.Graphics.TextureAddressMode
Convert ( FilterType type, Axiom.Graphics.FilterOptions options, XnaTextureType texType ) : Microsoft.Xna.Framework.Graphics.TextureFilter

Convert ( VertexElementType type, bool tex ) : Microsoft.Xna.Framework.Graphics.VertexElementFormat
Convert ( VertexElementSemantic semantic ) : Microsoft.Xna.Framework.Graphics.VertexElementUsage
Convert ( TextureType type ) : XnaTextureType
Convert ( TexCoordCalcMethod method ) : int
GetClosestSupported ( Axiom format ) : Axiom.Media.PixelFormat
GetDriverInfo ( ) : DriverCollection

Enumerates driver information and their supported display modes.

IsIdentity ( Microsoft.Xna.Framework matrix ) : bool

Checks Xna matrix to see if it an identity matrix.

For whatever reason, the equality operator overloads for the Xna Matrix struct are extremely slow....

ToRectangle ( BasicBox rectangle ) : Rectangle
ToRectangle ( Core rectangle ) : Rectangle

Method Details

Convert() public static method

Helper method to convert Axiom scene blend factors to Xna
public static Convert ( SceneBlendFactor factor ) : Microsoft.Xna.Framework.Graphics.Blend
factor SceneBlendFactor
return Microsoft.Xna.Framework.Graphics.Blend

Convert() public static method

Static method for converting LayerBlendOperationEx enum values to the Direct3D TextureOperation enum.
public static Convert ( LayerBlendOperationEx blendop ) : Microsoft.Xna.Framework.Graphics.BlendFunction
blendop LayerBlendOperationEx
return Microsoft.Xna.Framework.Graphics.BlendFunction

Convert() public static method

public static Convert ( Axiom color ) : Microsoft.Xna.Framework.Color
color Axiom
return Microsoft.Xna.Framework.Color

Convert() public static method

public static Convert ( Microsoft.Xna.Framework color ) : ColorEx
color Microsoft.Xna.Framework
return Axiom.Core.ColorEx

Convert() public static method

public static Convert ( Axiom mode, bool flip ) : Microsoft.Xna.Framework.Graphics.CullMode
mode Axiom
flip bool
return Microsoft.Xna.Framework.Graphics.CullMode

Convert() public static method

public static Convert ( Axiom matrix ) : Matrix
matrix Axiom
return Microsoft.Xna.Framework.Matrix

Convert() public static method

public static Convert ( Axiom.Graphics.BufferUsage usage ) : Microsoft.Xna.Framework.Graphics.Axiom.Graphics.BufferUsage
usage Axiom.Graphics.BufferUsage
return Microsoft.Xna.Framework.Graphics.Axiom.Graphics.BufferUsage

Convert() public static method

Converts our CompareFunction enum to the XFG.Compare equivalent.
public static Convert ( Axiom.Graphics.CompareFunction func ) : Microsoft.Xna.Framework.Graphics.Axiom.Graphics.CompareFunction
func Axiom.Graphics.CompareFunction
return Microsoft.Xna.Framework.Graphics.Axiom.Graphics.CompareFunction

Convert() public static method

public static Convert ( SurfaceFormat semantic ) : PixelFormat
semantic SurfaceFormat
return PixelFormat

Convert() public static method

Converts the D3D ShadingMode to our Shading enum equivalent.
public static Convert ( Axiom op ) : Microsoft.Xna.Framework.Graphics.StencilOperation
op Axiom
return Microsoft.Xna.Framework.Graphics.StencilOperation

Convert() public static method

Converts our StencilOperation enum to the D3D StencilOperation equivalent.
public static Convert ( Axiom op, bool invert ) : Microsoft.Xna.Framework.Graphics.StencilOperation
op Axiom
invert bool
return Microsoft.Xna.Framework.Graphics.StencilOperation

Convert() public static method

public static Convert ( PixelFormat format ) : Microsoft.Xna.Framework.Graphics.SurfaceFormat
format PixelFormat
return Microsoft.Xna.Framework.Graphics.SurfaceFormat

Convert() public static method

public static Convert ( TextureAddressing type ) : Microsoft.Xna.Framework.Graphics.TextureAddressMode
type TextureAddressing
return Microsoft.Xna.Framework.Graphics.TextureAddressMode

Convert() public static method

public static Convert ( FilterType type, Axiom.Graphics.FilterOptions options, XnaTextureType texType ) : Microsoft.Xna.Framework.Graphics.TextureFilter
type FilterType
options Axiom.Graphics.FilterOptions
texType XnaTextureType
return Microsoft.Xna.Framework.Graphics.TextureFilter

Convert() public static method

public static Convert ( VertexElementType type, bool tex ) : Microsoft.Xna.Framework.Graphics.VertexElementFormat
type VertexElementType
tex bool
return Microsoft.Xna.Framework.Graphics.VertexElementFormat

Convert() public static method

public static Convert ( VertexElementSemantic semantic ) : Microsoft.Xna.Framework.Graphics.VertexElementUsage
semantic VertexElementSemantic
return Microsoft.Xna.Framework.Graphics.VertexElementUsage

Convert() public static method

public static Convert ( TextureType type ) : XnaTextureType
type TextureType
return XnaTextureType

Convert() public static method

public static Convert ( TexCoordCalcMethod method ) : int
method TexCoordCalcMethod
return int

GetClosestSupported() public static method

public static GetClosestSupported ( Axiom format ) : Axiom.Media.PixelFormat
format Axiom
return Axiom.Media.PixelFormat

GetDriverInfo() public static method

Enumerates driver information and their supported display modes.
public static GetDriverInfo ( ) : DriverCollection
return DriverCollection

IsIdentity() public static method

Checks Xna matrix to see if it an identity matrix.
For whatever reason, the equality operator overloads for the Xna Matrix struct are extremely slow....
public static IsIdentity ( Microsoft.Xna.Framework matrix ) : bool
matrix Microsoft.Xna.Framework
return bool

ToRectangle() public static method

public static ToRectangle ( BasicBox rectangle ) : Rectangle
rectangle BasicBox
return Microsoft.Xna.Framework.Rectangle

ToRectangle() public static method

public static ToRectangle ( Core rectangle ) : Rectangle
rectangle Core
return Microsoft.Xna.Framework.Rectangle