Maria GDK 5.0.0.738
Documentation of native code in develop branch
Loading...
Searching...
No Matches
STK::MaterialLoader Class Reference

#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::MeshColorsloadColors (const rapidjson::Value &colors_block)
 
std::shared_ptr< STK::TextureloadTextureBlock (const rapidjson::Value &tex_block)
 
std::shared_ptr< STK::ShaderProgramloadShaderBlock (const rapidjson::Value &shd_block)
 

Protected Attributes

std::shared_ptr< STK::TextureManagertex_mgr_
 
std::shared_ptr< STK::ShaderProgramManagershader_mgr_
 
std::string filename_
 
std::map< std::string, MatEntrymaterials_
 

Detailed Description

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 {

shader can be specified with only name, which will refer to

a shader already registered in the shader manager. If files

are specified, a new shader object with this name is registered

in the manager

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

these values are stored per mesh, not material, so they can

also be specified in the binding

color = [ r, g, b, a] ambient = [r, g, b, a] diffuse = [r, g, b, a] specular = [r, g, b, a] shininess = s }


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