|
iridescence
|
Container to store multiple drawables and draw them in order. It can also store a shader setting for each drawable. More...
#include <drawable_container.hpp>


Public Types | |
| using | Ptr = std::shared_ptr<Drawable> |
| using | ConstPtr = std::shared_ptr<const Drawable> |
| Public Types inherited from glk::Drawable | |
| using | Ptr = std::shared_ptr<Drawable> |
| using | ConstPtr = std::shared_ptr<const Drawable> |
Public Member Functions | |
| DrawableContainer (bool skip_model_matrix_setting=true) | |
| Constructor. | |
| DrawableContainer (std::initializer_list< glk::Drawable::ConstPtr > init, bool skip_model_matrix_setting=true) | |
| Constructor. | |
| virtual | ~DrawableContainer () |
| size_t | size () const |
| Number of drawables in the container. | |
| void | clear () |
| Clear all drawables in the container. | |
| void | push_back (const glk::Drawable::ConstPtr &drawable) |
| Add a drawable to the container. | |
| void | push_back (const glk::Drawable::ConstPtr &drawable, const guik::ShaderSetting &shader_setting) |
| Add a drawable to the container with a shader setting. | |
| virtual void | draw (glk::GLSLShader &shader) const override |
| Public Member Functions inherited from glk::Drawable | |
| virtual | ~Drawable () |
Public Attributes | |
| bool | skip_model_matrix |
| std::vector< std::pair< std::optional< guik::ShaderSetting >, glk::Drawable::ConstPtr > > | drawables |
Container to store multiple drawables and draw them in order. It can also store a shader setting for each drawable.
| using glk::DrawableContainer::ConstPtr = std::shared_ptr<const Drawable> |
| using glk::DrawableContainer::Ptr = std::shared_ptr<Drawable> |
| glk::DrawableContainer::DrawableContainer | ( | bool | skip_model_matrix_setting = true | ) |
Constructor.
| skip_model_matrix_setting | If true, the model matrix setting will be skipped when drawing the drawables. |
| glk::DrawableContainer::DrawableContainer | ( | std::initializer_list< glk::Drawable::ConstPtr > | init, |
| bool | skip_model_matrix_setting = true ) |
Constructor.
| init | Initializer list of drawables to be added to the container. |
| skip_model_matrix_setting | If true, the model matrix setting will be skipped when drawing the drawables. |
|
virtual |
| void glk::DrawableContainer::clear | ( | ) |
Clear all drawables in the container.
|
overridevirtual |
Reimplemented from glk::Drawable.
| void glk::DrawableContainer::push_back | ( | const glk::Drawable::ConstPtr & | drawable | ) |
Add a drawable to the container.
| drawable | Drawable to be added. |
| void glk::DrawableContainer::push_back | ( | const glk::Drawable::ConstPtr & | drawable, |
| const guik::ShaderSetting & | shader_setting ) |
Add a drawable to the container with a shader setting.
| drawable | Drawable to be added. |
| shader_setting | Shader setting to be used when drawing the drawable. |
| size_t glk::DrawableContainer::size | ( | ) | const |
Number of drawables in the container.
| std::vector<std::pair<std::optional<guik::ShaderSetting>, glk::Drawable::ConstPtr> > glk::DrawableContainer::drawables |
| bool glk::DrawableContainer::skip_model_matrix |