esp::gfx::GenericDrawable class

Base classes

class Drawable
Drawable for use with DrawableGroup.

Public static variables

static const char* SHADER_KEY_TEMPLATE constexpr

Constructors, destructors, conversion operators

GenericDrawable(scene::SceneNode& node, Magnum::GL::Mesh& mesh, ShaderManager& shaderManager, const Magnum::ResourceKey& lightSetup, const Magnum::ResourceKey& materialData, DrawableGroup* group = nullptr) explicit

Public functions

void setLightSetup(const Magnum::ResourceKey& lightSetup) override

Protected functions

void draw(const Magnum::Matrix4& transformationMatrix, Magnum::SceneGraph::Camera3D& camera) override
void updateShader()
auto getShaderKey(Magnum::UnsignedInt lightCount, Magnum::Shaders::Phong::Flags flags) const -> Magnum::ResourceKey

Protected variables

Magnum::GL::Texture2D* texture_
Magnum::Color4 color_
ShaderManager& shaderManager_
Magnum::Resource<Magnum::GL::AbstractShaderProgram, Magnum::Shaders::Phong> shader_
Magnum::Resource<MaterialData, PhongMaterialData> materialData_
Magnum::Resource<LightSetup> lightSetup_

Function documentation

esp::gfx::GenericDrawable::GenericDrawable(scene::SceneNode& node, Magnum::GL::Mesh& mesh, ShaderManager& shaderManager, const Magnum::ResourceKey& lightSetup, const Magnum::ResourceKey& materialData, DrawableGroup* group = nullptr) 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