Euphoria
Public Member Functions | Public Attributes | List of all members
eu::render::DefaultMaterial Struct Reference

A material affected by light. More...

Inheritance diagram for eu::render::DefaultMaterial:
eu::render::Material

Public Member Functions

 DefaultMaterial (const ShaderResource &resource)
 
void use_shader (const RenderContext &) override
 
void set_uniforms (const RenderContext &, const CompiledCamera &, const std::optional< m4 > &) override
 
void bind_textures (const RenderContext &, State *states, Assets *assets) override
 
void apply_lights (const RenderContext &, const Lights &lights, const RenderSettings &settings, State *states, Assets *assets) override
 
bool is_transparent () const override
 
- Public Member Functions inherited from eu::render::Material
 Material ()=default
 
virtual ~Material ()=default
 
 Material (const Material &)=delete
 
 Material (Material &&)=delete
 
void operator= (const Material &)=delete
 
void operator= (Material &&)=delete
 

Public Attributes

const LoadedShader_Default_Containershader_container = nullptr
 
Rgb color = colors::white
 
float alpha = 1.0f
 
Rgb ambient_tint = colors::white
 
Rgb specular_color = colors::white
 
float shininess = 32.0f
 
float emissive_factor = 0.0f
 
std::shared_ptr< Texture2ddiffuse
 
std::shared_ptr< Texture2dspecular
 
std::shared_ptr< Texture2demissive
 

Detailed Description

A material affected by light.

Definition at line 68 of file material.h.

Constructor & Destructor Documentation

◆ DefaultMaterial()

eu::render::DefaultMaterial::DefaultMaterial ( const ShaderResource resource)
explicit

Member Function Documentation

◆ apply_lights()

void eu::render::DefaultMaterial::apply_lights ( const RenderContext ,
const Lights lights,
const RenderSettings settings,
State states,
Assets assets 
)
overridevirtual

Implements eu::render::Material.

◆ bind_textures()

void eu::render::DefaultMaterial::bind_textures ( const RenderContext ,
State states,
Assets assets 
)
overridevirtual

Implements eu::render::Material.

◆ is_transparent()

bool eu::render::DefaultMaterial::is_transparent ( ) const
overridevirtual

Implements eu::render::Material.

◆ set_uniforms()

void eu::render::DefaultMaterial::set_uniforms ( const RenderContext ,
const CompiledCamera ,
const std::optional< m4 > &   
)
overridevirtual

Implements eu::render::Material.

◆ use_shader()

void eu::render::DefaultMaterial::use_shader ( const RenderContext )
overridevirtual

Implements eu::render::Material.

Member Data Documentation

◆ alpha

float eu::render::DefaultMaterial::alpha = 1.0f

Definition at line 72 of file material.h.

◆ ambient_tint

Rgb eu::render::DefaultMaterial::ambient_tint = colors::white

Definition at line 74 of file material.h.

◆ color

Rgb eu::render::DefaultMaterial::color = colors::white

Definition at line 71 of file material.h.

◆ diffuse

std::shared_ptr<Texture2d> eu::render::DefaultMaterial::diffuse

Definition at line 79 of file material.h.

◆ emissive

std::shared_ptr<Texture2d> eu::render::DefaultMaterial::emissive

Definition at line 81 of file material.h.

◆ emissive_factor

float eu::render::DefaultMaterial::emissive_factor = 0.0f

Definition at line 77 of file material.h.

◆ shader_container

const LoadedShader_Default_Container* eu::render::DefaultMaterial::shader_container = nullptr

Definition at line 70 of file material.h.

◆ shininess

float eu::render::DefaultMaterial::shininess = 32.0f

Definition at line 76 of file material.h.

◆ specular

std::shared_ptr<Texture2d> eu::render::DefaultMaterial::specular

Definition at line 80 of file material.h.

◆ specular_color

Rgb eu::render::DefaultMaterial::specular_color = colors::white

Definition at line 75 of file material.h.


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