Handles the updating and rendering of entities, camera, and shaders in a graphical environment. More...
#include <systems.hpp>
Static Public Member Functions | |
static void | Initialize () |
Initializes the render system. | |
static void | UpdateRenderSystem (EntityManager &em, Camera &cam, glm::ivec2 screen, bool shadow=false) |
Updates and renders the entire scene based on the current entity manager, camera, and shaders. | |
static void | SetSkyboxTexture (std::shared_ptr< Raftel::Texture > cubemapTexture) |
Sets the skybox texture. | |
static void | Shutdown () |
Releases all resources related to the skybox. | |
Handles the updating and rendering of entities, camera, and shaders in a graphical environment.
The RenderSystem
class is a core system responsible for the updating and rendering of the scene. It processes different systems such as deferred rendering, camera updates, lighting, shadow rendering, and scripting. The class includes static methods for each of these tasks and manages entities through the EntityManager
.
This class provides the infrastructure for a render loop, including shadow rendering and deferred rendering. It also offers the necessary utilities for integrating shaders and camera updates into the rendering pipeline.
Definition at line 44 of file systems.hpp.
|
static |
Initializes the render system.
This method sets up the necessary components for rendering, such as shaders, framebuffers, and other graphical systems needed for rendering the scene.
|
static |
Sets the skybox texture.
This function assigns a cubemap texture to be used as the skybox. If the skybox has not been initialized, this function also creates the necessary resources.
cubemapTexture | A shared pointer to the cubemap texture. |
|
static |
Releases all resources related to the skybox.
This function deletes the OpenGL buffers and resources allocated for the skybox, ensuring proper cleanup before shutting down the render system.
|
static |
Updates and renders the entire scene based on the current entity manager, camera, and shaders.
This method is responsible for updating the rendering system by applying transformations, rendering entities, and handling various systems like shadow and light rendering. It is the main method responsible for updating and rendering the scene during the render loop.
em | The entity manager that manages entities in the scene. |
cam | The camera used to view the scene. |
shader | The shader program used for rendering. |
screen | The screen resolution for the rendering process. |
shadow | A boolean flag to indicate whether shadows should be rendered. Default is false. |