#include <model.hpp>
Definition at line 55 of file model.hpp.
Public Member Functions | |
void | bind (gsgl::flags_t render_flags=0) |
platform::color & | get_ambient () |
platform::color & | get_diffuse () |
bool & | get_flat () |
gsgl::string & | get_name () |
platform::shader_base * | get_shader () |
float & | get_shininess () |
platform::color & | get_specular () |
platform::texture * | get_texture () |
bool | is_opaque () |
material (const gsgl::string &material_file, const gsgl::string &material_name) | |
~material () | |
Static Public Member Functions | |
static gsgl::data_object * | create_global_material_cache () |
Provided only so that it can be added to the global metacache in the right order. | |
Private Attributes | |
material_impl * | impl |
material | ( | const gsgl::string & | material_file, | |
const gsgl::string & | material_name | |||
) |
Definition at line 225 of file model.cpp.
References shared_object::attach(), cache::contains_index(), singleton::global_instance(), material::impl, material_file::materials, and string::w_string().
void bind | ( | gsgl::flags_t | render_flags = 0 |
) |
Definition at line 272 of file model.cpp.
References material_impl::ambient, assert, texture::bind(), CHECK_GL_ERRORS, material_impl::diffuse, material_impl::emissive, material_impl::flat, color::get_val(), material::impl, context::RENDER_UNTEXTURED, material_impl::shininess, material_impl::specular, and material_impl::tex.
Referenced by submesh::draw().
gsgl::data_object * create_global_material_cache | ( | ) | [static] |
Provided only so that it can be added to the global metacache in the right order.
Definition at line 307 of file model.cpp.
Referenced by application::application().
color & get_ambient | ( | ) |
Definition at line 256 of file model.cpp.
References material_impl::ambient, assert, and material::impl.
color & get_diffuse | ( | ) |
Definition at line 257 of file model.cpp.
References assert, material_impl::diffuse, and material::impl.
bool & get_flat | ( | ) |
Definition at line 260 of file model.cpp.
References assert, material_impl::flat, and material::impl.
string & get_name | ( | ) |
Definition at line 255 of file model.cpp.
References assert, material::impl, and material_impl::name.
platform::shader_base* get_shader | ( | ) |
float & get_shininess | ( | ) |
Definition at line 259 of file model.cpp.
References assert, material::impl, and material_impl::shininess.
color & get_specular | ( | ) |
Definition at line 258 of file model.cpp.
References assert, material::impl, and material_impl::specular.
texture * get_texture | ( | ) |
Definition at line 261 of file model.cpp.
References assert, material::impl, and material_impl::tex.
bool is_opaque | ( | ) |
Definition at line 264 of file model.cpp.
References material_impl::ambient, assert, color::COMPONENT_ALPHA, material_impl::diffuse, and material::impl.
material_impl* impl [private] |
Definition at line 57 of file model.hpp.
Referenced by material::bind(), material::get_ambient(), material::get_diffuse(), material::get_flat(), material::get_name(), material::get_shininess(), material::get_specular(), material::get_texture(), material::is_opaque(), and material::material().