OmegaEngine API  1.0.3
Classes | Static Public Member Functions | List of all members
OmegaEngine.Graphics.Shaders.DynamicShader Class Reference

Helper class for dynamically generating Shader code More...

Static Public Member Functions

static Effect Parse (Engine engine, string source, bool lighting, IDictionary< string, IEnumerable< int >> controllers)
 Parses and compiles a dynamic shader string More...
 
static Effect FromContent (Engine engine, string id, bool lighting, IDictionary< string, IEnumerable< int >> controllers)
 Loads a dynamic shader file from a game asset source via the ContentManager. More...
 

Detailed Description

Helper class for dynamically generating Shader code

Uses partial .fx files with XML control comments as input

Member Function Documentation

◆ FromContent()

static Effect OmegaEngine.Graphics.Shaders.DynamicShader.FromContent ( Engine  engine,
string  id,
bool  lighting,
IDictionary< string, IEnumerable< int >>  controllers 
)
inlinestatic

Loads a dynamic shader file from a game asset source via the ContentManager.

Parameters
engineThe Engine to compile the effect in
idThe ID of the shader to be loaded
lightingOptimize the shader for lighting or no lighting
controllersA set of int arrays that control the counters; null if there is no sync-code in the shader
Returns
The compiled effect

◆ Parse()

static Effect OmegaEngine.Graphics.Shaders.DynamicShader.Parse ( Engine  engine,
string  source,
bool  lighting,
IDictionary< string, IEnumerable< int >>  controllers 
)
inlinestatic

Parses and compiles a dynamic shader string

Parameters
engineThe Engine to compile the effect in
sourceThe source code to be parsed and compiled
lightingOptimize the shader for lighting or no lighting
controllersA set of int arrays that control the counters; null if there is no sync-code in the shader
Returns
The compiled effect

The documentation for this class was generated from the following file: