sculpto
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
scl::material Class Reference

#include <material.h>

Inheritance diagram for scl::material:
scl::material_phong scl::material_single_color

Public Member Functions

 material (shared< shader_program > Shader)
 
virtual void Bind () const
 
virtual void Unbind () const
 

Static Public Member Functions

static shared< materialCreate (shared< shader_program > Shader)
 

Public Attributes

shared< shader_programShader {}
 

Detailed Description

Mesh material class.

Definition at line 17 of file material.h.

Constructor & Destructor Documentation

◆ material()

scl::material::material ( shared< shader_program Shader)
inline
  • Material constructor by shader only.
Parameters
Shader- material shader to use while mesh with this material rendering.

Definition at line 27 of file material.h.

27 :
28 Shader(Shader) {}
shared< shader_program > Shader
Definition: material.h:20

Member Function Documentation

◆ Bind()

virtual void scl::material::Bind ( ) const
inlinevirtual
  • Bind material to current render stage function.
Parameters
None.
Returns
None.

Reimplemented in scl::material_phong, and scl::material_single_color.

Definition at line 36 of file material.h.

37 {
38 if (Shader != nullptr) Shader->Bind();
39 }

◆ Create()

static shared< material > scl::material::Create ( shared< shader_program Shader)
inlinestatic
  • Material creation function by shader only.
Parameters
Shader- material shader to use while mesh with this material rendering.

Definition at line 57 of file material.h.

58 {
59 return CreateShared<material>(Shader);
60 }

◆ Unbind()

virtual void scl::material::Unbind ( ) const
inlinevirtual
  • Unbind material from current render stage function.
Parameters
Slot- texture slot to unbind it from.
Returns
None.

Reimplemented in scl::material_phong, and scl::material_single_color.

Definition at line 47 of file material.h.

48 {
49 if (Shader != nullptr) Shader->Unbind();
50 }

Member Data Documentation

◆ Shader

shared<shader_program> scl::material::Shader {}

Material data.

Definition at line 20 of file material.h.


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