1 #ifndef RADIX_RENDERER_HPP
2 #define RADIX_RENDERER_HPP
83 return renderMesh(rc, shader, mdlMtx, mesh, &mat);
Definition: Viewport.hpp:6
Definition: GameController.hpp:7
uint lightsUBO
Definition: Renderer.hpp:116
void translate(const Vector3f &v)
Definition: Matrix4f.cpp:49
void renderText(RenderContext &rc, Text text)
Renders a string to the screen using signed-distance field text rendering.
Definition: Renderer.cpp:69
RenderContext rc
Definition: Renderer.hpp:120
ECS entity, Component container It is created like this:
Definition: Entity.hpp:23
int vpWidth
Definition: Renderer.hpp:124
Definition: SubRenderer.hpp:14
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.
Definition: Renderer.cpp:73
Definition: Rectangle.hpp:10
std::vector< SubRenderer * > subRenderers
Definition: Renderer.hpp:123
World & world
Definition: Renderer.hpp:118
Renderer(World &world)
Definition: Renderer.cpp:13
Definition: Renderer.hpp:112
Viewport * getViewport() const
Definition: Renderer.hpp:46
int vpHeight
Definition: Renderer.hpp:124
TextRenderer textRenderer
Definition: Renderer.hpp:121
void render()
Cycles through all the sub-renderers and calls their render function.
Definition: Renderer.cpp:30
void updateLights(Shader &shader)
Initializes the lights in the world on the given shader.
Definition: Renderer.cpp:36
Definition: TextRenderer.hpp:14
static Matrix4f clipProjMat(const Entity &ent, const Matrix4f &view, const Matrix4f &proj)
static Matrix4f getFrameView(const Matrix4f &src, const Matrix4f &in, const Matrix4f &out)
Definition: Renderer.cpp:120
void removeRenderer(SubRenderer &subRenderer)
Remove a renderer from the render queue.
Definition: Renderer.cpp:194
void init()
Definition: Renderer.cpp:23
Definition: RenderContext.hpp:15
void setViewport(Viewport *vp)
Definition: Renderer.hpp:43
void rotate(float angle, float x, float y, float z)
Definition: Matrix4f.cpp:56
bool uniformBuffers
Definition: Renderer.hpp:113
struct radix::Renderer::Support support
Definition: Matrix4f.hpp:25
static Matrix4f getFrameView(const Matrix4f &src, const Transform &in, const Transform &out)
Definition: Renderer.hpp:97
Main renderer - handles sub-renderers and provides low level render functions.
Definition: Renderer.hpp:35
Viewport * viewport
Definition: Renderer.hpp:119
void renderMesh(RenderContext &rc, Shader &shader, Matrix4f &mdlMtx, const Mesh &mesh, const Material &mat)
Definition: Renderer.hpp:81
static bool clipViewFrame(const RenderContext &rc, const Mesh &frame, const Transform &frameTform, RectangleI &scissor)
Definition: Renderer.cpp:125
void addRenderer(SubRenderer &subRenderer)
Add a renderer to the render queue.
Definition: Renderer.cpp:190
Definition: Material.hpp:11