#include <ElementRenderer.hpp>
Public Member Functions | |
ElementRenderer (Instance *inst) | |
Instance * | instance () const |
void | init_frame () |
void | end_frame () |
virtual void | AddRenderable_Solid (Renderable *, GLuint shader_id, GLuint primary_texture_id)=0 |
virtual void | AddRenderable_Translucent (Renderable *, GLuint shader_id, GLuint primary_texture_id)=0 |
void | QueueSecondPass (Elem *) |
void | DequeueSecondPass (Elem *) |
void | Notify_FirstPass_Refresh (Elem *) |
void | Notify_SecondPass_Refresh (Elem *) |
Public Attributes | |
ClientMarker | cm |
Protected Member Functions | |
void | RunSecondPasses () |
virtual void | FrameStart ()=0 |
virtual void | RunRender (CameraState const &state)=0 |
Detailed Description
Definition at line 24 of file ElementRenderer.hpp.
Constructor & Destructor Documentation
◆ ElementRenderer()
iv::ElementRenderer::ElementRenderer | ( | Instance * | inst | ) |
Definition at line 10 of file ElementRenderer.cpp.
Member Function Documentation
◆ instance()
Instance * iv::ElementRenderer::instance | ( | ) | const |
Definition at line 18 of file ElementRenderer.cpp.
◆ init_frame()
void iv::ElementRenderer::init_frame | ( | ) |
Definition at line 49 of file ElementRenderer.cpp.
◆ end_frame()
void iv::ElementRenderer::end_frame | ( | ) |
Definition at line 63 of file ElementRenderer.cpp.
◆ AddRenderable_Solid()
|
pure virtual |
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.
Implemented in iv::FixedOrder_Camera.
◆ AddRenderable_Translucent()
|
pure virtual |
Implemented in iv::FixedOrder_Camera.
◆ QueueSecondPass()
void iv::ElementRenderer::QueueSecondPass | ( | Elem * | node | ) |
For optimal performance, queue self in first pass after children were put through first pass.
Definition at line 23 of file ElementRenderer.cpp.
◆ DequeueSecondPass()
void iv::ElementRenderer::DequeueSecondPass | ( | Elem * | node | ) |
Must be called in second_pass to mark that the second pass was done. For optimal performance, call this at the beginning of second pass and then call second pass on children with changed inherited children in opposite order than first pass was called on them (but not all children have to go through second_pass).
Definition at line 28 of file ElementRenderer.cpp.
◆ Notify_FirstPass_Refresh()
void iv::ElementRenderer::Notify_FirstPass_Refresh | ( | Elem * | elem | ) |
Should be called if there is some recomputation done in the first pass of the element.
Definition at line 69 of file ElementRenderer.cpp.
◆ Notify_SecondPass_Refresh()
void iv::ElementRenderer::Notify_SecondPass_Refresh | ( | Elem * | elem | ) |
Should be called if there is some recomputation done in the second pass of the element.
Definition at line 74 of file ElementRenderer.cpp.
◆ RunSecondPasses()
|
protected |
Definition at line 39 of file ElementRenderer.cpp.
◆ FrameStart()
|
protectedpure virtual |
Implemented in iv::FixedOrder_Camera.
◆ RunRender()
|
protectedpure virtual |
Implemented in iv::FixedOrder_Camera.
Member Data Documentation
◆ cm
ClientMarker iv::ElementRenderer::cm |
Definition at line 27 of file ElementRenderer.hpp.
The documentation for this class was generated from the following files:
- ivorium_graphics/Elements/ElementRenderer.hpp
- ivorium_graphics/Elements/ElementRenderer.cpp