esp::gfx::GenericDrawable class

Base classes

class Drawable
Drawable for use with DrawableGroup.

Public types

struct GenericMaterialCache

Constructors, destructors, conversion operators

GenericDrawable(scene::SceneNode& node, Mn::GL::Mesh* mesh, Drawable::Flags& meshAttributeFlags, ShaderManager& shaderManager, DrawableConfiguration& cfg) explicit

Public functions

void setLightSetup(const Mn::ResourceKey& lightSetupKey) override

Protected functions

void draw(const Mn::Matrix4& transformationMatrix, Mn::SceneGraph::Camera3D& camera) override
void updateShader()
void updateShaderLightingParametersInternal() override

Protected variables

Mn::Shaders::PhongGL::Flags flags_
ShaderManager& shaderManager_
Mn::Resource<Mn::GL::AbstractShaderProgram, Mn::Shaders::PhongGL> shader_
GenericMaterialCache matCache
const gfx::Drawable::Flags meshAttributeFlags_

Function documentation

esp::gfx::GenericDrawable::GenericDrawable(scene::SceneNode& node, Mn::GL::Mesh* mesh, Drawable::Flags& meshAttributeFlags, ShaderManager& shaderManager, DrawableConfiguration& cfg) explicit

Create a GenericDrawable for the given object using shader and mesh. Adds drawable to given group and uses provided texture, and color for textured buffer and color shader output respectively

Variable documentation

GenericMaterialCache esp::gfx::GenericDrawable::matCache protected

Local cache of material quantities to speed up access in draw

const gfx::Drawable::Flags esp::gfx::GenericDrawable::meshAttributeFlags_ protected

Creation attributes of this drawable