C# Class Axiom.Graphics.Technique

Class representing an approach to rendering a particular Material.
The engine will attempt to use the best technique supported by the active hardware, unless you specifically request a lower detail technique (say for distant rendering)
ファイルを表示 Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Property Type Description
_GPUDeviceNameRules List
_GPUVendorRules List

Public Methods

Method Description
ApplyTextureAliases ( string>.Dictionary aliasList, bool apply ) : bool
Clone ( Material parent ) : Technique

Clones this Technique.

CompileIlluminationPasses ( ) : void

Internal method for splitting the passes into illumination passes.

CopyTo ( Technique target ) : void

Copy the details of this Technique to another.

CreatePass ( ) : Pass

Creates a new Pass for this technique.

A Pass is a single rendering pass, ie a single draw of the given material. Note that if you create a non-programmable pass, during compilation of the material the pass may be split into multiple passes if the graphics card cannot handle the number of texture units requested. For programmable passes, however, the number of passes you create will never be altered, so you have to make sure that you create an alternative fallback Technique for if a card does not have enough facilities for what you're asking for.

GetIlluminationPass ( int index ) : IlluminationPass

Retreives the IlluminationPass at the specified index.

GetPass ( int index ) : Pass

Retreives the Pass at the specified index.

GetPass ( string passName ) : Pass

Retreives the Pass by name.

Load ( ) : void

Loads resources required by this Technique.

Preload ( ) : void

Preloads resources required by this Technique. This is the portion that is safe to do from a thread other than the main render thread.

RemoveAllPasses ( ) : void

Removes all passes from this technique and queues them for deletion.

RemovePass ( Pass pass ) : void

Removes the specified Pass from this Technique.

SetFog ( bool overrideScene ) : void
SetFog ( bool overrideScene, FogMode mode, ColorEx color, Real expDensity, Real linearStart, Real linearEnd ) : void

Sets the fogging mode applied to each pass.

This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.

SetSceneBlending ( SceneBlendFactor src, SceneBlendFactor dest ) : void
SetSceneBlending ( SceneBlendType blendType ) : void
SetShadowCasterMaterial ( string name ) : void
SetShadowReceiverMaterial ( string name ) : void
Technique ( Material parent ) : System
Unload ( ) : void

Unloads resources used by this Technique.

Protected Methods

Method Description
ClearIlluminationPasses ( ) : void

Internal method for clearing the illumination pass list.

Private Methods

Method Description
AddGPUDeviceNameRule ( GPUDeviceNameRule rule ) : void

Add a rule which manually influences the support for this technique based on a pattern that matches a GPU device name (e.g. '*8800*').

You can use this facility to manually control whether a technique is considered supported, based on a GPU device name pattern. You can add inclusive or exclusive rules, and you can add as many of each as you like. If at least one inclusive rule is added, a technique is considered unsupported if it does not match any of those inclusive rules. If exclusive rules are added, the technique is considered unsupported if it matches any of those inclusive rules. The pattern you supply can include wildcard characters ('*') if you only want to match part of the device name. Note that any rule for the same device pattern will be removed before adding this one.

AddGPUVenderRule ( GPUVendorRule rule ) : void

Add a rule which manually influences the support for this technique based on a GPU vendor.

You can use this facility to manually control whether a technique is considered supported, based on a GPU vendor. You can add inclusive or exclusive rules, and you can add as many of each as you like. If at least one inclusive rule is added, a technique is considered unsupported if it does not match any of those inclusive rules. If exclusive rules are added, the technique is considered unsupported if it matches any of those inclusive rules. Note that any rule for the same vendor will be removed before adding this one. ///

Compile ( bool autoManageTextureUnits ) : String

Compilation method for Techniques. See Axiom.Graphics.Material

NotifyNeedsRecompile ( ) : void

Forces this Technique to recompile.

The parent Material is asked to recompile to accomplish this.

RemoveGPUDeviceNameRule ( GPUDeviceNameRule rule ) : void

Removes a matching device name rule.

RemoveGPUVendorRule ( GPUVendorRule rule ) : void

Removes a matching vendor rule.

Method Details

ApplyTextureAliases() public method

public ApplyTextureAliases ( string>.Dictionary aliasList, bool apply ) : bool
aliasList string>.Dictionary
apply bool
return bool

ClearIlluminationPasses() protected method

Internal method for clearing the illumination pass list.
protected ClearIlluminationPasses ( ) : void
return void

Clone() public method

Clones this Technique.
public Clone ( Material parent ) : Technique
parent Material Material that will own this technique.
return Technique

CompileIlluminationPasses() public method

Internal method for splitting the passes into illumination passes.
public CompileIlluminationPasses ( ) : void
return void

CopyTo() public method

Copy the details of this Technique to another.
public CopyTo ( Technique target ) : void
target Technique
return void

CreatePass() public method

Creates a new Pass for this technique.
A Pass is a single rendering pass, ie a single draw of the given material. Note that if you create a non-programmable pass, during compilation of the material the pass may be split into multiple passes if the graphics card cannot handle the number of texture units requested. For programmable passes, however, the number of passes you create will never be altered, so you have to make sure that you create an alternative fallback Technique for if a card does not have enough facilities for what you're asking for.
public CreatePass ( ) : Pass
return Pass

GetIlluminationPass() public method

Retreives the IlluminationPass at the specified index.
public GetIlluminationPass ( int index ) : IlluminationPass
index int Index of the IlluminationPass to retreive.
return IlluminationPass

GetPass() public method

Retreives the Pass at the specified index.
public GetPass ( int index ) : Pass
index int Index of the Pass to retreive.
return Pass

GetPass() public method

Retreives the Pass by name.
public GetPass ( string passName ) : Pass
passName string Name of the Pass to retreive.
return Pass

Load() public method

Loads resources required by this Technique.
public Load ( ) : void
return void

Preload() public method

Preloads resources required by this Technique. This is the portion that is safe to do from a thread other than the main render thread.
public Preload ( ) : void
return void

RemoveAllPasses() public method

Removes all passes from this technique and queues them for deletion.
public RemoveAllPasses ( ) : void
return void

RemovePass() public method

Removes the specified Pass from this Technique.
public RemovePass ( Pass pass ) : void
pass Pass A reference to the Pass to be removed.
return void

SetFog() public method

public SetFog ( bool overrideScene ) : void
overrideScene bool
return void

SetFog() public method

Sets the fogging mode applied to each pass.
This property actually exists on the Pass class. For simplicity, this method allows you to set these properties for every current Pass within this Technique. If you need more precision, retrieve the Pass instance and set the property there.
public SetFog ( bool overrideScene, FogMode mode, ColorEx color, Real expDensity, Real linearStart, Real linearEnd ) : void
overrideScene bool
mode FogMode
color Axiom.Core.ColorEx
expDensity Real
linearStart Real
linearEnd Real
return void

SetSceneBlending() public method

public SetSceneBlending ( SceneBlendFactor src, SceneBlendFactor dest ) : void
src SceneBlendFactor
dest SceneBlendFactor
return void

SetSceneBlending() public method

public SetSceneBlending ( SceneBlendType blendType ) : void
blendType SceneBlendType
return void

SetShadowCasterMaterial() public method

public SetShadowCasterMaterial ( string name ) : void
name string
return void

SetShadowReceiverMaterial() public method

public SetShadowReceiverMaterial ( string name ) : void
name string
return void

Technique() public method

public Technique ( Material parent ) : System
parent Material
return System

Unload() public method

Unloads resources used by this Technique.
public Unload ( ) : void
return void

Property Details

_GPUDeviceNameRules protected_oe property

protected List _GPUDeviceNameRules
return List

_GPUVendorRules protected_oe property

protected List _GPUVendorRules
return List