#include <material.h>
Classes | |
struct | BlendConfig |
struct | StencilConfig |
Public Member Functions | |
virtual | ~Material () |
void | SetVertexColorWeight (Scalar weight) |
void | SetBlendConfig (BlendConfig blend_config) |
void | SetStencilConfig (StencilConfig stencil_config) |
void | SetTranslucent (bool is_translucent) |
SceneContextOptions | GetContextOptions (const RenderPass &pass) const |
virtual MaterialType | GetMaterialType () const =0 |
virtual void | BindToCommand (const SceneContext &scene_context, HostBuffer &buffer, RenderPass &pass) const =0 |
Static Public Member Functions | |
static std::unique_ptr< Material > | MakeFromFlatbuffer (const fb::Material &material, const std::vector< std::shared_ptr< Texture >> &textures) |
static std::unique_ptr< UnlitMaterial > | MakeUnlit () |
static std::unique_ptr< PhysicallyBasedMaterial > | MakePhysicallyBased () |
Protected Attributes | |
Scalar | vertex_color_weight_ = 1 |
BlendConfig | blend_config_ |
StencilConfig | stencil_config_ |
bool | is_translucent_ = false |
Definition at line 27 of file material.h.
|
virtualdefault |
|
pure virtual |
Implemented in impeller::scene::PhysicallyBasedMaterial, and impeller::scene::UnlitMaterial.
Referenced by impeller::scene::EncodeCommand().
SceneContextOptions impeller::scene::Material::GetContextOptions | ( | const RenderPass & | pass | ) | const |
Definition at line 62 of file material.cc.
References impeller::RenderPass::GetRenderTarget(), impeller::RenderTarget::GetSampleCount(), and impeller::scene::SceneContextOptions::sample_count.
Referenced by impeller::scene::EncodeCommand().
|
pure virtual |
Implemented in impeller::scene::PhysicallyBasedMaterial, and impeller::scene::UnlitMaterial.
|
static |
Definition at line 27 of file material.cc.
References impeller::scene::UnlitMaterial::MakeFromFlatbuffer(), impeller::scene::PhysicallyBasedMaterial::MakeFromFlatbuffer(), and textures.
|
static |
Definition at line 42 of file material.cc.
Referenced by impeller::scene::PhysicallyBasedMaterial::MakeFromFlatbuffer().
|
static |
Definition at line 38 of file material.cc.
Referenced by impeller::scene::UnlitMaterial::MakeFromFlatbuffer(), and impeller::scene::testing::TEST_P().
void impeller::scene::Material::SetBlendConfig | ( | BlendConfig | blend_config | ) |
Definition at line 50 of file material.cc.
References blend_config_.
void impeller::scene::Material::SetStencilConfig | ( | StencilConfig | stencil_config | ) |
Definition at line 54 of file material.cc.
References stencil_config_.
void impeller::scene::Material::SetTranslucent | ( | bool | is_translucent | ) |
Definition at line 58 of file material.cc.
References is_translucent_.
void impeller::scene::Material::SetVertexColorWeight | ( | Scalar | weight | ) |
Definition at line 46 of file material.cc.
References vertex_color_weight_.
|
protected |
Definition at line 68 of file material.h.
Referenced by SetBlendConfig().
|
protected |
Definition at line 70 of file material.h.
Referenced by SetTranslucent().
|
protected |
Definition at line 69 of file material.h.
Referenced by SetStencilConfig().
|
protected |
Definition at line 67 of file material.h.
Referenced by impeller::scene::UnlitMaterial::BindToCommand(), and SetVertexColorWeight().