C# Class open3mod.MaterialMapper

Map assimp materials to OpenGl materials and shaders. Each scene has its own MaterialMapper, which is accessible via the Scene.MaterialMapper property. The class interface is implemented for every type of renderer.
Inheritance: IDisposable
Afficher le fichier Open project: acgessler/open3mod Class Usage Examples

Protected Properties

Свойство Type Description
_scene Scene

Méthodes publiques

Méthode Description
ApplyGhostMaterial ( Mesh mesh, Assimp.Material material, bool shaded ) : void
ApplyMaterial ( Mesh mesh, Assimp.Material mat, bool textured, bool shaded ) : void

Applies a material to the Gl state machine. Depending on the renderer, this either sets GLSL shaders (GL3) or it configures the fixed function pipeline (legacy/classic).

BeginScene ( open3mod.Renderer renderer ) : void
Dispose ( ) : void
EndScene ( open3mod.Renderer renderer ) : void
IsAlphaMaterial ( Assimp.Material material ) : bool

Check if a given assimp material requires alpha-blending for rendering

UploadTextures ( Assimp.Material material ) : bool

Uploads all the textures required for a given material to VRAM (i.e. create the corresponding Gl objects). Textures that have been uploaded before are not attempted again.

Méthodes protégées

Méthode Description
MaterialMapper ( Scene scene ) : System

Private Methods

Méthode Description
IsTransparent ( float f ) : bool

Method Details

ApplyGhostMaterial() public abstract méthode

public abstract ApplyGhostMaterial ( Mesh mesh, Assimp.Material material, bool shaded ) : void
mesh Assimp.Mesh
material Assimp.Material
shaded bool
Résultat void

ApplyMaterial() public abstract méthode

Applies a material to the Gl state machine. Depending on the renderer, this either sets GLSL shaders (GL3) or it configures the fixed function pipeline (legacy/classic).
public abstract ApplyMaterial ( Mesh mesh, Assimp.Material mat, bool textured, bool shaded ) : void
mesh Assimp.Mesh Mesh to be drawn. This parameter may be left null /// to use a material with geometry other than assimp meshes (i.e. /// for the material preview tab). In this case, it is assumed that /// the geometry to be used with the materials specifies normals, /// one set of UV coordinates but no vertex colors. /// TODO tangents, bitangents? ///
mat Assimp.Material Material to be applied, must be non-null
textured bool
shaded bool
Résultat void

BeginScene() public abstract méthode

public abstract BeginScene ( open3mod.Renderer renderer ) : void
renderer open3mod.Renderer
Résultat void

Dispose() public abstract méthode

public abstract Dispose ( ) : void
Résultat void

EndScene() public abstract méthode

public abstract EndScene ( open3mod.Renderer renderer ) : void
renderer open3mod.Renderer
Résultat void

IsAlphaMaterial() public méthode

Check if a given assimp material requires alpha-blending for rendering
public IsAlphaMaterial ( Assimp.Material material ) : bool
material Assimp.Material
Résultat bool

MaterialMapper() protected méthode

protected MaterialMapper ( Scene scene ) : System
scene Scene
Résultat System

UploadTextures() public méthode

Uploads all the textures required for a given material to VRAM (i.e. create the corresponding Gl objects). Textures that have been uploaded before are not attempted again.
public UploadTextures ( Assimp.Material material ) : bool
material Assimp.Material
Résultat bool

Property Details

_scene protected_oe property

protected Scene _scene
Résultat Scene