GlPortal Class Reference
0.1.1
Source code documentation of the free and open 3D action puzzle game.
|
Main renderer - handles sub-renderers and provides low level render functions. More...
#include <external/RadixEngine/include/radix/renderer/Renderer.hpp>
Data Structures | |
struct | Support |
Public Member Functions | |
Renderer (World &world) | |
void | setViewport (Viewport *vp) |
Viewport * | getViewport () const |
void | init () |
void | updateLights (Shader &shader) |
Initializes the lights in the world on the given shader. More... | |
void | render () |
Cycles through all the sub-renderers and calls their render function. More... | |
void | renderText (RenderContext &rc, Text text) |
Renders a string to the screen using signed-distance field text rendering. More... | |
void | renderMesh (RenderContext &rc, Shader &shader, Matrix4f &mdlMtx, const Mesh &mesh, const Material *mat=nullptr) |
Renders a mesh with the specified material and transform determined by the given modelMatrix. More... | |
void | renderMesh (RenderContext &rc, Shader &shader, Matrix4f &mdlMtx, const Mesh &mesh, const Material &mat) |
void | addRenderer (SubRenderer &subRenderer) |
Add a renderer to the render queue. More... | |
void | removeRenderer (SubRenderer &subRenderer) |
Remove a renderer from the render queue. More... | |
Static Public Member Functions | |
static Matrix4f | getFrameView (const Matrix4f &src, const Matrix4f &in, const Matrix4f &out) |
static Matrix4f | getFrameView (const Matrix4f &src, const Transform &in, const Transform &out) |
static bool | clipViewFrame (const RenderContext &rc, const Mesh &frame, const Transform &frameTform, RectangleI &scissor) |
static Matrix4f | clipProjMat (const Entity &ent, const Matrix4f &view, const Matrix4f &proj) |
Private Attributes | |
struct radix::Renderer::Support | support |
uint | lightsUBO |
World & | world |
Viewport * | viewport |
RenderContext | rc |
TextRenderer | textRenderer |
std::vector< SubRenderer * > | subRenderers |
int | vpWidth |
int | vpHeight |
Main renderer - handles sub-renderers and provides low level render functions.
This class is responsible for all rendering. You push all of your sub-renderers into a renderer stack, and those sub-renderers then get invoked by one main render function.
As well as that, it also provides low-level render functions to be used by specific renderers.
radix::Renderer::Renderer | ( | World & | world | ) |
world | The world to render |
void radix::Renderer::addRenderer | ( | SubRenderer & | subRenderer | ) |
Add a renderer to the render queue.
|
static |
|
static |
|
static |
|
inlinestatic |
|
inline |
void radix::Renderer::init | ( | ) |
void radix::Renderer::removeRenderer | ( | SubRenderer & | subRenderer | ) |
Remove a renderer from the render queue.
void radix::Renderer::render | ( | ) |
Cycles through all the sub-renderers and calls their render function.
void radix::Renderer::renderMesh | ( | RenderContext & | rc, |
Shader & | shader, | ||
Matrix4f & | mdlMtx, | ||
const Mesh & | mesh, | ||
const Material * | mat = nullptr |
||
) |
Renders a mesh with the specified material and transform determined by the given modelMatrix.
rc | RenderContext |
shader | Shader to use to render the mesh |
mdlMtx | The model matrix determining the position, rotation and scale of the mesh |
mesh | The mesh to render |
mat | The material to render the mesh with |
|
inline |
void radix::Renderer::renderText | ( | RenderContext & | rc, |
Text | text | ||
) |
Renders a string to the screen using signed-distance field text rendering.
text | The text to render |
|
inline |
void radix::Renderer::updateLights | ( | Shader & | shader | ) |
Initializes the lights in the world on the given shader.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |