gdk-graphics 0b051eb9b5c1eaa0658babaa4463dd7a80aa9d2c
Loading...
Searching...
No Matches
gdk::webgl1es2_scene Class Referencefinal

render scene. More...

#include <webgl1es2_scene.h>

Inheritance diagram for gdk::webgl1es2_scene:
gdk::scene

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
 
using material_to_model_to_entity_collection_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 from the scene
 
virtual void draw (const gdk::graphics_intvector2_type &aFrameBufferSize) const override
 draws the scene
 

Detailed Description

render scene.

Member Typedef Documentation

◆ material_to_model_to_entity_collection_collection

Initial value:
std::unordered_map<material_ptr_type, model_to_entity_collection>

associative collection: Materials to {Models to collections of Entities} - Used to optimize GL calls

◆ model_to_entity_collection

Initial value:
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

Member Function Documentation

◆ add() [1/3]

virtual void gdk::webgl1es2_scene::add ( const std::shared_ptr< const entity > & pEntity)
overridevirtual

add an entity to the scene

Implements gdk::scene.

◆ add() [2/3]

virtual void gdk::webgl1es2_scene::add ( const std::shared_ptr< const screen_camera > & pCamera)
overridevirtual

add a screen camera to the scene

Implements gdk::scene.

◆ add() [3/3]

virtual void gdk::webgl1es2_scene::add ( const std::shared_ptr< const texture_camera > & pCamera)
overridevirtual

add a texture camera to the scene

Implements gdk::scene.

◆ draw()

virtual void gdk::webgl1es2_scene::draw ( const gdk::graphics_intvector2_type & aFrameBufferSize) const
overridevirtual

draws the scene

Implements gdk::scene.

◆ remove() [1/3]

virtual void gdk::webgl1es2_scene::remove ( const std::shared_ptr< const entity > & pEntity)
overridevirtual

remove an entity from the scene

Implements gdk::scene.

◆ remove() [2/3]

virtual void gdk::webgl1es2_scene::remove ( const std::shared_ptr< const screen_camera > & pCamera)
overridevirtual

remove a screen camera from the scene

Implements gdk::scene.

◆ remove() [3/3]

virtual void gdk::webgl1es2_scene::remove ( const std::shared_ptr< const texture_camera > & pCamera)
overridevirtual

remove a texture camera from the scene

Implements gdk::scene.


The documentation for this class was generated from the following file: