![]() |
Maria GDK 5.0.0.909
Documentation of native code in develop branch
|
#include <StkMaterial.h>
Public Member Functions | |
| void | merge (const Material &mat) |
| void | setName (const std::string &name) |
| const std::string & | getName () const |
| void | setDepthTest (const bool depth_test) |
| bool | getDepthTest () const |
| void | setShaderProgram (const std::shared_ptr< ShaderProgram > &shader_program) |
| const std::shared_ptr< ShaderProgram > & | getShaderProgram () const |
| void | setTexture (const std::shared_ptr< Texture > &texture) |
| const std::shared_ptr< Texture > & | getTexture () const |
| void | setTextureTransform (const std::shared_ptr< STK::TextureTransform > &tex_xfm) |
| std::shared_ptr< STK::TextureTransform > | getTextureTransform () const |
| void | setBlendFunc (const std::shared_ptr< BlendFunc > &blend) |
| Set blending function. | |
| const std::shared_ptr< BlendFunc > & | getBlendFunc () const |
| void | apply (const std::shared_ptr< const Material > &curr_material=nullptr) |
| void | setCastShadows (const bool cast_shadows) |
| bool | getCastShadows () const |
| std::shared_ptr< Material > | refCopy () |
Protected Attributes | |
| std::shared_ptr< ShaderProgram > | shader_program_ |
| std::shared_ptr< Texture > | texture_ |
| std::shared_ptr< TextureTransform > | tex_xfm_ |
| std::shared_ptr< BlendFunc > | blend_func_ |
| std::string | name_ |
| bool | cast_shadows_ |
| bool | depth_test_ |
Material - Simple material class with only color texture
| void Material::apply | ( | const std::shared_ptr< const Material > & | curr_material = nullptr | ) |
Apply material. This method will apply the current material settings in the current GL context. If a curr_material is given, we compare each material setting with the current state first to avoid unnecessary state changes.
|
inline |
Enable/disable shadow casting. If shadow casting is disabled, all objects with this material will be skipped in the shadow map rendering pass.