Table of Contents

Struct XMaterial

Namespace
OmegaEngine.Graphics
Assembly
OmegaEngine.dll

A combination of textures and lighting parameters.

public struct XMaterial
Inherited Members
Extension Methods

Remarks

XMaterial instances are auto-generated when XMeshes are loaded.

Constructors

XMaterial(ITextureProvider?)

public XMaterial(ITextureProvider? diffuse)

Parameters

diffuse ITextureProvider

XMaterial(Color)

public XMaterial(Color color)

Parameters

color Color

Fields

DiffuseMaps

The diffuse textures maps

public readonly ITextureProvider[] DiffuseMaps

Field Value

ITextureProvider[]

Properties

Ambient

The color of the material when lit by ambient/background light (always active)

public Color Ambient { readonly get; set; }

Property Value

Color

D3DMaterial

A DirectX material with the color information form this XMaterial

public Material D3DMaterial { get; }

Property Value

Material

DefaultMaterial

A plain white untextured material

public static XMaterial DefaultMaterial { get; }

Property Value

XMaterial

Diffuse

The color of the material when hit by diffuse light (normal lighting)

public Color Diffuse { readonly get; set; }

Property Value

Color

Emissive

The color of the light this material emits by itself - doubles as glow color

public Color Emissive { readonly get; set; }

Property Value

Color

EmissiveMap

The emissive (self-shining, without light source) - doubles as the glow map

public ITextureProvider? EmissiveMap { readonly get; set; }

Property Value

ITextureProvider

HeightMap

The height map (an optional addition to the normal map)

public ITextureProvider? HeightMap { readonly get; set; }

Property Value

ITextureProvider

NormalMap

The normal map (i.e. bump map)

public ITextureProvider? NormalMap { readonly get; set; }

Property Value

ITextureProvider

Specular

The color of specular (shiny) highlights on the material surface

public Color Specular { readonly get; set; }

Property Value

Color

SpecularMap

The specular map (which spots are "shiny")

public ITextureProvider? SpecularMap { readonly get; set; }

Property Value

ITextureProvider

SpecularPower

The sharpness of specular highlights (lower value = sharper)

public float SpecularPower { readonly get; set; }

Property Value

float

Methods

HoldReference()

Calls HoldReference() for all contained XTextures.

public void HoldReference()

ReleaseReference()

Calls ReleaseReference() for all contained XTextures.

public void ReleaseReference()