C# 클래스 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.
상속: IDisposable
파일 보기 프로젝트 열기: acgessler/open3mod 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
_scene Scene

공개 메소드들

메소드 설명
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.

보호된 메소드들

메소드 설명
MaterialMapper ( Scene scene ) : System

비공개 메소드들

메소드 설명
IsTransparent ( float f ) : bool

메소드 상세

ApplyGhostMaterial() 공개 추상적인 메소드

public abstract ApplyGhostMaterial ( Mesh mesh, Assimp.Material material, bool shaded ) : void
mesh Assimp.Mesh
material Assimp.Material
shaded bool
리턴 void

ApplyMaterial() 공개 추상적인 메소드

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
리턴 void

BeginScene() 공개 추상적인 메소드

public abstract BeginScene ( open3mod.Renderer renderer ) : void
renderer open3mod.Renderer
리턴 void

Dispose() 공개 추상적인 메소드

public abstract Dispose ( ) : void
리턴 void

EndScene() 공개 추상적인 메소드

public abstract EndScene ( open3mod.Renderer renderer ) : void
renderer open3mod.Renderer
리턴 void

IsAlphaMaterial() 공개 메소드

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

MaterialMapper() 보호된 메소드

protected MaterialMapper ( Scene scene ) : System
scene Scene
리턴 System

UploadTextures() 공개 메소드

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
리턴 bool

프로퍼티 상세

_scene 보호되어 있는 프로퍼티

protected Scene _scene
리턴 Scene