![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
OpenGL 4.6 Renderer that tries to mimic vulkan pipeline. More...
#include <Renderer.hpp>
Collaboration diagram for galaxy::Renderer:Public Member Functions | |
| Renderer () | |
| Constructor. | |
| ~Renderer () | |
| Destructor. | |
| void | prepare () |
| Called only in the update loop when we need to refresh data to render. | |
| void | begin_pass (RenderPass &pass) |
| Binds framebuffer, viewport, sissor region and clears buffers. | |
| void | bind_pipeline (RenderPipeline &pipeline) |
| Binds the GPU state specified in pipeline. | |
| void | push_cmd (RenderCmd &cmd) noexcept |
| Push a renderable object. | |
| void | end_pass (Camera &camera) |
| Renders everything configured in this pass. | |
Private Attributes | |
| VertexBatch | m_quads |
| Quad vertex batch. | |
| std::vector< RenderCmd > | m_commands |
| RenderCmd storage. | |
| RenderPass * | m_pass |
| Currently active pass. | |
| RenderPipeline * | m_pipeline |
| Currently active pipeline. | |
| ShaderBuffer | m_uniform_storage |
| Renderable uniforms buffer. | |
| ShaderBuffer | m_camera_storage |
| Camera buffer. | |
| std::vector< RenderData > | m_uniform_data |
| Renderable uniform data storage. | |
| unsigned int | m_uniform_data_index |
| Uniform data current max index. | |
OpenGL 4.6 Renderer that tries to mimic vulkan pipeline.
Definition at line 24 of file Renderer.hpp.
| galaxy::Renderer::Renderer | ( | ) |
| galaxy::Renderer::~Renderer | ( | ) |
Destructor.
Definition at line 36 of file Renderer.cpp.
| void galaxy::Renderer::prepare | ( | ) |
Called only in the update loop when we need to refresh data to render.
Definition at line 42 of file Renderer.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void galaxy::Renderer::begin_pass | ( | RenderPass & | pass | ) |
Binds framebuffer, viewport, sissor region and clears buffers.
Call this first.
| pass | RenderPass to bind. |
Definition at line 53 of file Renderer.cpp.
Here is the caller graph for this function:| void galaxy::Renderer::bind_pipeline | ( | RenderPipeline & | pipeline | ) |
Binds the GPU state specified in pipeline.
Call this second.
| pipeline | RenderPipeline to bind. |
Definition at line 66 of file Renderer.cpp.
Here is the caller graph for this function:
|
noexcept |
Push a renderable object.
Try not to push too many non-quads, only quads are batched.
| cmd | RenderCmd to draw. |
Definition at line 91 of file Renderer.cpp.
Here is the caller graph for this function:| void galaxy::Renderer::end_pass | ( | Camera & | camera | ) |
Renders everything configured in this pass.
| camera | Projection and view matrix to render this pass with. |
Definition at line 116 of file Renderer.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Quad vertex batch.
Definition at line 80 of file Renderer.hpp.
|
private |
RenderCmd storage.
Definition at line 85 of file Renderer.hpp.
|
private |
Currently active pass.
Definition at line 90 of file Renderer.hpp.
|
private |
Currently active pipeline.
Definition at line 95 of file Renderer.hpp.
|
private |
Renderable uniforms buffer.
Definition at line 100 of file Renderer.hpp.
|
private |
Camera buffer.
Definition at line 105 of file Renderer.hpp.
|
private |
Renderable uniform data storage.
Definition at line 110 of file Renderer.hpp.
|
private |
Uniform data current max index.
Definition at line 115 of file Renderer.hpp.