Scene root that renders items in fixed order, no Z sorting. More...

#include <FixedOrder_Camera.hpp>

Public Member Functions

 FixedOrder_Camera (Instance *, iv::RenderTarget::Geometry)
 
virtual void FrameStart () override
 
virtual void AddRenderable_Solid (Renderable *, GLuint shader_id, GLuint primary_texture_id) override
 
virtual void AddRenderable_Translucent (Renderable *, GLuint shader_id, GLuint primary_texture_id) override
 
virtual void RunRender (CameraState const &state) override
 
- Public Member Functions inherited from iv::Camera
 Camera (Instance *, RenderTarget::Geometry)
 
 ~Camera ()
 
void status (iv::TableDebugView *view)
 
void render_scene (Elem *view=nullptr)
 
void geometry (RenderTarget::Geometry geometry)
 
virtual Cameraelem_getRoot () override
 
float3 FromLocalSpaceToViewportSpace (float4x4 model_transform, float3)
 
float3 FromViewportSpaceToLocalSpace (float4x4 model_transform, float3)
 
float2 FromViewportPlaneToLocalPlane (float4x4 model_transform, float2)
 
- Public Member Functions inherited from iv::Slot
 Slot (Instance *)
 
void status (iv::TableDebugView *view)
 
Instanceinstance () const
 
- Public Member Functions inherited from iv::VectorChildrenElem< SlotChild >
 VectorChildrenElem (Instance *inst)
 
 ~VectorChildrenElem ()
 
T * createChild (CArgs const &... cargs)
 
T * createChild_Instance (char const *name, CArgs const &... cargs)
 
void pushChild (SlotChild *)
 
void removeChild (SlotChild *)
 
- Public Member Functions inherited from iv::Elem
 Elem (Instance *inst)
 
 ~Elem ()
 
void status (iv::TableDebugView *view)
 
Instanceinstance () const
 
void elem_setParent (Elem *)
 
Elemelem_getParent ()
 
void first_pass (ElementRenderer *)
 
void second_pass (ElementRenderer *)
 
unsigned first_pass_frame_id ()
 
unsigned second_pass_frame_id ()
 
Elemenabled (bool val)
 
void quiet (bool)
 
bool quiet () const
 
float3 FromLocalSpaceToScreenSpace (float3 local_space)
 
float3 FromScreenSpaceToLocalSpace (float3 screen_space)
 
float2 FromScreenPlaneToLocalPlane (float2 screen_space)
 
void Add_InputNode (InputNode *node)
 
void Remove_InputNode (InputNode *node)
 
- Public Member Functions inherited from iv::InputNode
 InputNode (Instance *inst)
 
 ~InputNode ()
 
Instanceinstance () const
 
void status (iv::TableDebugView *view)
 
void inputEnabled (bool)
 
bool inputEnabled ()
 
void quiet (bool)
 
bool quiet () const
 
void input_deactivate ()
 
void input_treeRefresh ()
 
void input_setParent (InputNode *)
 
InputNodeinput_getParent ()
 
virtual InputRootinput_getRoot ()
 
bool input_trigger_visit (InputRoot *root, Input::DeviceKey key)
 
bool input_visit (InputRoot *root, Input::DeviceKey key, bool &press, bool &real, bool &offspace)
 
- Public Member Functions inherited from iv::SlotChild
 SlotChild (Elem *elem)
 
Instanceinstance () const
 
void status (iv::TableDebugView *view)
 
virtual bool picking_test (int2 input_pos) override
 
virtual bool picking_test_pixel_perfect (float2 local_pos)
 
- Public Member Functions inherited from iv::Pickable
 Pickable (Elem *elem)
 
Elemelem ()
 
const Elemelem () const
 

Public Attributes

ClientMarker cm
 
- Public Attributes inherited from iv::Camera
ClientMarker cm
 
- Public Attributes inherited from iv::Slot
ClientMarker cm
 
- Public Attributes inherited from iv::VectorChildrenElem< SlotChild >
ClientMarker cm
 
- Public Attributes inherited from iv::Elem
ClientMarker cm
 
DirtyAttr< bool > attr_enabled
 
DirtyAttr< float4x4modelTransform
 
DirtyAttr< ShaderScissorscissor
 
- Public Attributes inherited from iv::InputNode
ClientMarker cm
 
- Public Attributes inherited from iv::SlotChild
ClientMarker cm
 
DirtyAttr< float3expectedSize
 
DirtyAttr< float3preferredSize
 
DirtyAttr< float3size
 
- Public Attributes inherited from iv::Pickable
ClientMarker cm
 

Additional Inherited Members

- Protected Member Functions inherited from iv::Slot
virtual void first_pass_impl (ElementRenderer *) override
 
virtual void second_pass_impl (ElementRenderer *) override
 
- Protected Member Functions inherited from iv::VectorChildrenElem< SlotChild >
virtual void elem_eachChild (std::function< void(Elem *) > const &) override
 
virtual void elem_childDisconnect (Elem *) override
 
virtual void input_eachChild (std::function< void(InputNode *) > const &f) override
 
virtual void input_childDisconnect (InputNode *child) override
 
- Protected Member Functions inherited from iv::InputNode
virtual bool input_trigger_process (InputRoot *root, Input::DeviceKey key)
 
virtual void input_process (InputRoot *root, Input::DeviceKey key, bool &press, bool &real, bool &offspace)
 
- Protected Attributes inherited from iv::VectorChildrenElem< SlotChild >
std::vector< SlotChild * > children
 
bool children_dirty
 

Detailed Description

Scene root that renders items in fixed order, no Z sorting.

Renders elements in the order they were added to the ElementRenderer - order they are placed in the element tree. This uses depth buffer for opaque elements, so they will not really be rendered in given order, but they will appear as if they were. Opaque elements are in fact grouped by shader id and texture id to have less context switches.

Definition at line 21 of file FixedOrder_Camera.hpp.

Constructor & Destructor Documentation

◆ FixedOrder_Camera()

iv::FixedOrder_Camera::FixedOrder_Camera ( Instance inst,
iv::RenderTarget::Geometry  geometry 
)

Definition at line 12 of file FixedOrder_Camera.cpp.

Member Function Documentation

◆ FrameStart()

void iv::FixedOrder_Camera::FrameStart ( )
overridevirtual

Implements iv::ElementRenderer.

Definition at line 20 of file FixedOrder_Camera.cpp.

◆ AddRenderable_Solid()

void iv::FixedOrder_Camera::AddRenderable_Solid ( Renderable ,
GLuint  shader_id,
GLuint  primary_texture_id 
)
overridevirtual

Shoud be called from first pass on the way down (before children have first_pass). This means that renderable will be rendered in next frame. It will not be rendered in following frames if it is not activated again before each of those frames. This behavior allows us to remove renderables from render queue without callbacks into ElementRenderer. We can put 0 to shader_id and/or primary_texture_id when we don't know the id yet, but that will preven render grouping.

Implements iv::ElementRenderer.

Definition at line 26 of file FixedOrder_Camera.cpp.

◆ AddRenderable_Translucent()

void iv::FixedOrder_Camera::AddRenderable_Translucent ( Renderable renderable,
GLuint  shader_id,
GLuint  primary_texture_id 
)
overridevirtual

Implements iv::ElementRenderer.

Definition at line 42 of file FixedOrder_Camera.cpp.

◆ RunRender()

void iv::FixedOrder_Camera::RunRender ( CameraState const &  state)
overridevirtual

Implements iv::ElementRenderer.

Definition at line 58 of file FixedOrder_Camera.cpp.

Member Data Documentation

◆ cm

ClientMarker iv::FixedOrder_Camera::cm

Definition at line 24 of file FixedOrder_Camera.hpp.


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