![]() |
gdk-graphics
1b6d84e044c2c953fd7c9501e628a67e80f4da0d
|
render scene. More...
#include <webgl1es2_scene.h>
Public Types | |
using | material_ptr_type = std::shared_ptr< webgl1es2_material > |
materials can be shared across webgl1es2_scenes | |
using | model_ptr_type = std::shared_ptr< webgl1es2_model > |
models can be shared across webgl1es2_scenes | |
using | model_to_entity_collection = std::unordered_map< model_ptr_type, std::unordered_set< std::shared_ptr< const entity > >> |
using | material_to_model_to_entity_collection_collection = std::unordered_map< material_ptr_type, model_to_entity_collection > |
Public Member Functions | |
external interface | |
virtual void | add (const std::shared_ptr< const screen_camera > &pCamera) override |
add a screen camera to the scene | |
virtual void | add (const std::shared_ptr< const texture_camera > &pCamera) override |
add a texture camera to the scene | |
virtual void | add (const std::shared_ptr< const entity > &pEntity) override |
add an entity to the scene | |
virtual void | remove (const std::shared_ptr< const screen_camera > &pCamera) override |
remove a screen camera from the scene | |
virtual void | remove (const std::shared_ptr< const texture_camera > &pCamera) override |
remove a texture camera from the scene | |
virtual void | remove (const std::shared_ptr< const entity > &pEntity) override |
remove an entity to the scene | |
virtual void | draw (const gdk::graphics_intvector2_type &aFrameBufferSize) const override |
draws the scene | |
![]() | |
void | add (const entity_owner &rOwner) |
add all an owner's entities to the scene | |
void | remove (const entity_owner &rOwner) |
remove all an owner's entities from the scene | |
render scene.
using gdk::webgl1es2_scene::material_to_model_to_entity_collection_collection = std::unordered_map<material_ptr_type, model_to_entity_collection> |
associative collection: Materials to {Models to collections of Entities} - Used to optimize GL calls
using gdk::webgl1es2_scene::model_to_entity_collection = std::unordered_map<model_ptr_type, std::unordered_set<std::shared_ptr<const entity> >> |
associative collection: Models to collections of Entities - Used to optimize GL calls