![]() |
Maria GDK 5.0.0.738
Documentation of native code in develop branch
|
#include <StkMaterialLoader.h>
Classes | |
struct | MatEntry |
Public Member Functions | |
MaterialLoader (const std::shared_ptr< TextureManager > &tex_mgr, const std::shared_ptr< ShaderProgramManager > &shader_mgr) | |
bool | load (const std::string &filename, const std::shared_ptr< STK::MeshGraphicsModel > &model) |
Protected Member Functions | |
bool | parseMaterial (const rapidjson::Value &generic_value, const std::shared_ptr< STK::MeshGraphicsModel > &model) |
std::shared_ptr< STK::MeshColors > | loadColors (const rapidjson::Value &colors_block) |
std::shared_ptr< STK::Texture > | loadTextureBlock (const rapidjson::Value &tex_block) |
std::shared_ptr< STK::ShaderProgram > | loadShaderBlock (const rapidjson::Value &shd_block) |
Protected Attributes | |
std::shared_ptr< STK::TextureManager > | tex_mgr_ |
std::shared_ptr< STK::ShaderProgramManager > | shader_mgr_ |
std::string | filename_ |
std::map< std::string, MatEntry > | materials_ |
MaterialLoader - Short description. Detailed description.
material { texture { file = texture_file wrap_s = wrap_mode wrap_t = wrap_mode mag_filter = filter_value min_filter = filter_value unit = unit_num } shader {
name = shader_name vertex_shader_file = "filename" fragment_shader_file = "filename" } cast_shadows = true|false color = [ r, g, b, a] ambient = [r, g, b, a] diffuse = [r, g, b, a] specular = [r, g, b, a] shininess = s }
binding { material = "material_name" node = "node_name_regexp" mesh = "mesh_name_regexp" recursive = true|false
color = [ r, g, b, a] ambient = [r, g, b, a] diffuse = [r, g, b, a] specular = [r, g, b, a] shininess = s }