Bubba-3D
0.9.0
Awesome game engine!
|
#include <HudRenderer.h>
Public Member Functions | |
virtual void | render () |
virtual void | renderShadow (ShaderProgram *shaderProgram) |
virtual void | update (float dt) |
virtual void | updateLayout () |
virtual void | setLayout (Layout *layout) |
virtual Layout * | getLayoutById (std::string id) |
virtual IHudDrawable * | getHudDrawableById (std::string id) |
void | setWorldCamera (Camera *worldCamera) |
void | addRelativeLayout (GameObject *relativeTo, Layout *layout) |
![]() | |
void | bind (GameObject *owner) |
virtual void | beforeCollision (GameObject *collider) |
virtual void | duringCollision (GameObject *collider) |
virtual void | afterCollision (GameObject *collider) |
virtual void | onDeath () |
Protected Member Functions | |
chag::float4x4 | createOrthographicProjection () |
Protected Attributes | |
std::map< std::string, IHudDrawable * > | squares |
Layout * | rootLayout |
Camera * | worldCamera |
std::vector< std::pair< GameObject *, Layout * > > | relativeLayouts |
![]() | |
ShaderProgram * | shaderProgram |
![]() | |
GameObject * | owner |
The main class used to render a HUD or other types of UI
Definition at line 33 of file HudRenderer.h.
|
virtual |
Get the low-level drawable produced by any of the layout components.
You can retrieve the GLSquare produced as a background by specifying the layout id of the Layout that produced the background. This can be useful if you want to modify the rotation and/or position of an element without calling HudRenderer::updateLayout()
You can retrieve the TextObject produced by a TextLayout by specifying the text id. This can be used to modify the text of the element without calling HudRenderer::updateLayout()
Definition at line 72 of file HudRenderer.cpp.
|
virtual |
Get any layout in the root layout added in HudRenderer::setLayout() by its layout ID.
Definition at line 47 of file HudRenderer.cpp.
|
virtual |
Set the layout of the HUD
Definition at line 42 of file HudRenderer.cpp.
|
virtual |
Whenever you change something about the active Layout or its children you must call this method to update the rendering. This is a bit expensive and should be avoided when possible.
Definition at line 51 of file HudRenderer.cpp.