Euphoria
eu::render::CompiledMeshMaterial Struct Reference

#include <compiledmesh.h>

Public Member Functions

 CompiledMeshMaterial ()
 
void set_texture (const core::EnumValue &name, std::shared_ptr< Texture2 > texture)
 
void load_default_materials_from_shader (TextureCache *cache)
 Gets the default materials from the shader if they are null/not set. More...
 
void apply (const mat4f &model_matrix, const mat4f &projection_matrix, const mat4f &view_matrix, const vec3f &camera, const Light &light) const
 
bool validate () const
 Asks the shader if all the textures are set, and if more than necessary are set. More...
 

Public Attributes

Rgb ambient
 
Rgb diffuse
 
Rgb specular
 
float shininess
 
std::shared_ptr< MaterialShadershader
 
std::map< core::EnumValue, std::shared_ptr< Texture2 > > textures
 

Detailed Description

Definition at line 41 of file compiledmesh.h.

Constructor & Destructor Documentation

◆ CompiledMeshMaterial()

eu::render::CompiledMeshMaterial::CompiledMeshMaterial ( )

Definition at line 25 of file compiledmesh.cc.

Member Function Documentation

◆ apply()

void eu::render::CompiledMeshMaterial::apply ( const mat4f model_matrix,
const mat4f projection_matrix,
const mat4f view_matrix,
const vec3f camera,
const Light light 
) const

Definition at line 50 of file compiledmesh.cc.

◆ load_default_materials_from_shader()

void eu::render::CompiledMeshMaterial::load_default_materials_from_shader ( TextureCache cache)

Gets the default materials from the shader if they are null/not set.

Definition at line 93 of file compiledmesh.cc.

◆ set_texture()

void eu::render::CompiledMeshMaterial::set_texture ( const core::EnumValue name,
std::shared_ptr< Texture2 texture 
)

Definition at line 35 of file compiledmesh.cc.

◆ validate()

bool eu::render::CompiledMeshMaterial::validate ( ) const

Asks the shader if all the textures are set, and if more than necessary are set.

Definition at line 109 of file compiledmesh.cc.

Member Data Documentation

◆ ambient

Rgb eu::render::CompiledMeshMaterial::ambient

Definition at line 43 of file compiledmesh.h.

◆ diffuse

Rgb eu::render::CompiledMeshMaterial::diffuse

Definition at line 44 of file compiledmesh.h.

◆ shader

std::shared_ptr<MaterialShader> eu::render::CompiledMeshMaterial::shader

Definition at line 47 of file compiledmesh.h.

◆ shininess

float eu::render::CompiledMeshMaterial::shininess

Definition at line 46 of file compiledmesh.h.

◆ specular

Rgb eu::render::CompiledMeshMaterial::specular

Definition at line 45 of file compiledmesh.h.

◆ textures

std::map<core::EnumValue, std::shared_ptr<Texture2> > eu::render::CompiledMeshMaterial::textures

Definition at line 48 of file compiledmesh.h.


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