|
matf-rg-engine
1.0.0
Base for project for the Computer Graphics course at Faculty of Mathematics, University of Belgrade
|
Implements basic drawing methods that the core::App implementation uses. More...
#include <GraphicsController.hpp>


Public Member Functions | |
| std::string_view | name () const override |
| void | begin_gui () |
| Calls internal methods for the beginning of gui drawing. Should be called in pair with GraphicsController::end_gui. More... | |
| void | end_gui () |
| Calls internal method for the ending of gui drawing. Should be called in pair with GraphicsController::begin_gui. More... | |
| void | draw_skybox (const resources::Shader *shader, const resources::Skybox *skybox) |
| Draws a resources::Skybox with the resources::Shader. More... | |
| Camera * | camera () |
| template<ProjectionType type = Perspective> | |
| glm::mat4 | projection_matrix () const |
| Compute the projection matrix. More... | |
| glm::mat4 | projection_matrix (ProjectionType type=Perspective) const |
| Compute the projection matrix. More... | |
| PerspectiveMatrixParams & | perspective_params () |
| Use this function to change the perspective projection matrix parameters. Projection matrix is always computed when the GraphicsController::projection_matrix is called. More... | |
| const PerspectiveMatrixParams & | perspective_params () const |
| Get the current PerspectiveMatrixParams values. More... | |
| OrthographicMatrixParams & | orthographic_params () |
| Use this function to change the orthographic projection matrix parameters. Projection matrix is always computed when GraphicsController::projection_matrix is called. More... | |
| const OrthographicMatrixParams & | orthographic_params () const |
| Get the current OrthographicMatrixParams values. More... | |
Public Member Functions inherited from engine::core::Controller | |
| virtual | ~Controller ()=default |
| void | before (Controller *next) |
| void | after (Controller *prev) |
| const std::vector< Controller * > & | next () const |
| bool | is_enabled () const |
| Controller will execute as long this function returns true. More... | |
| void | set_enable (bool value) |
| Enables or disables the controller based on value. The engine::core::App executes only the enabled controllers, except for the Controller::poll_events function, that's executed always. By default, controllers are enabled when registered. More... | |
Private Member Functions | |
| void | initialize () override |
| Initializes OpenGL, ImGUI, and projection matrix params;. More... | |
| void | terminate () |
| Terminate the controller. Executes in the core::App::terminate. More... | |
Private Attributes | |
| PerspectiveMatrixParams | m_perspective_params {} |
| OrthographicMatrixParams | m_ortho_params {} |
| glm::mat4 | m_projection_matrix {} |
| Camera | m_camera {} |
| ImGuiContext * | m_imgui_context {} |
Additional Inherited Members | |
Static Public Member Functions inherited from engine::core::Controller | |
| template<typename TController > | |
| static TController * | get (std::source_location location=std::source_location::current()) |
| Serves as a single access point for all the Controller types throughout the code base. Make sure to register the controller via App::register_controller before calling this function. More... | |
Implements basic drawing methods that the core::App implementation uses.
This class should implement all the complex functions needed for drawing an entity in the scene. For example GraphicsController::draw_skybox.
|
overridevirtual |
Returns the controller class name; used for logging.
Reimplemented from engine::core::Controller.
| void engine::graphics::GraphicsController::begin_gui | ( | ) |
Calls internal methods for the beginning of gui drawing. Should be called in pair with GraphicsController::end_gui.
Example:
| void engine::graphics::GraphicsController::end_gui | ( | ) |
Calls internal method for the ending of gui drawing. Should be called in pair with GraphicsController::begin_gui.
| void engine::graphics::GraphicsController::draw_skybox | ( | const resources::Shader * | shader, |
| const resources::Skybox * | skybox | ||
| ) |
Draws a resources::Skybox with the resources::Shader.
|
inline |
|
inline |
Compute the projection matrix.
|
inline |
Compute the projection matrix.
|
inline |
Use this function to change the perspective projection matrix parameters. Projection matrix is always computed when the GraphicsController::projection_matrix is called.
|
inline |
Get the current PerspectiveMatrixParams values.
|
inline |
Use this function to change the orthographic projection matrix parameters. Projection matrix is always computed when GraphicsController::projection_matrix is called.
|
inline |
Get the current OrthographicMatrixParams values.
|
overrideprivatevirtual |
Initializes OpenGL, ImGUI, and projection matrix params;.
Reimplemented from engine::core::Controller.
|
privatevirtual |
Terminate the controller. Executes in the core::App::terminate.
Note that the terminate executes in the reverse order from initialize.
Reimplemented from engine::core::Controller.
|
private |
|
private |
|
private |
|
private |
|
private |