gtsam_points
Loading...
Searching...
No Matches
mesh_model.hpp
Go to the documentation of this file.
1#ifndef GLK_MESH_MODEL_HPP
2#define GLK_MESH_MODEL_HPP
3
4#include <glk/drawable.hpp>
5
6namespace guik {
7struct ShaderSetting;
8} // namespace guik
9
10namespace glk {
11
12class Mesh;
13class Texture;
14
15class MeshModel : public glk::Drawable {
16public:
17 void push_mesh(const int material_id, const std::shared_ptr<glk::Mesh>& mesh);
18 void push_material(const guik::ShaderSetting& setting, const std::shared_ptr<glk::Texture>& texture);
19 void override_material(const guik::ShaderSetting& setting, const std::shared_ptr<glk::Texture>& texture);
20
21 virtual void draw(glk::GLSLShader& shader) const override;
22
23private:
24 std::vector<int> material_ids;
25 std::vector<std::shared_ptr<glk::Mesh>> meshes;
26
27 std::vector<guik::ShaderSetting> settings;
28 std::vector<std::shared_ptr<glk::Texture>> textures;
29};
30
31} // namespace glk
32
33#endif
Definition drawable.hpp:12
Definition glsl_shader.hpp:20
Definition mesh_model.hpp:15
void override_material(const guik::ShaderSetting &setting, const std::shared_ptr< glk::Texture > &texture)
void push_material(const guik::ShaderSetting &setting, const std::shared_ptr< glk::Texture > &texture)
void push_mesh(const int material_id, const std::shared_ptr< glk::Mesh > &mesh)
virtual void draw(glk::GLSLShader &shader) const override
Definition async_buffer_copy.hpp:6
std::enable_if_t< needs_aligned_allocator< T >::value, std::shared_ptr< T > > make_shared(Args &&... args)
Definition make_shared.hpp:20
Definition drawable_container.hpp:9
Shader setting class that holds rendering settings.
Definition shader_setting.hpp:187