5#include "math/matrix_4.h"
7#include "frame_buffer.hpp"
26 std::array<coma::Mat4, 6> projections_;
31 float intensity_ = 0.0f;
33 float max_distance_ = 0.0f;
34 float inner_cutoff_ = 0.0f;
35 float outer_cutoff_ = 0.0f;
37 float constant_= 0.0f;
39 float quadratic_= 0.0f;
43 float roughness_= 0.0f;
44 float shininess_= 0.0f;
68 void setLightData(
float width,
float height,
const LightCmp& light_cmp,
71 void renderScene(
unsigned shader);
73 void updateTransformTree(std::vector<const RenderTreeCmp*>& component_stack,
74 std::vector<coma::Mat4>& transform_stack,
75 RenderTreeCmp& node_cmp,
77 void QuadRender()
const;
79 void uploadCameraData()
const;
80 void uploadDirectional()
const;
81 void uploadSpot()
const;
82 void uploadPoint()
const;
85 std::unique_ptr<Editor> editor_;
92 std::unique_ptr<FrameBuffer> color_frame_buffer_;
93 std::unique_ptr<FrameBuffer> light_frame_buffer_;
94 std::unique_ptr<FrameBuffer> point_frame_buffer_;
96 CameraData camera_data_;
97 LightData light_data_;
98 ObjectData object_data_;
Handles anything related to entities and components in the engine.
Definition: component_manager.hpp:29
Intiliazes the ComponentManager and the ResourceManager and ofers functions to retrieve them.
Definition: engine.hpp:12
Class used to render the scene.
Definition: renderer.hpp:49
Renderer(Engine &engine, Window &window, float ambient_strength=0.2f)
Constructor of the renderer.
void render()
Used to render the entire scene with all the entities.
Creates and updates a window.
Definition: window.hpp:20
represents mathematical matrix with 4 cols and 4 rows
Definition: matrix_4.h:11
represents mathematical vector with 3 components
Definition: vector_3.h:12
Component used to simulate different types of lights.
Definition: default_components.hpp:69
Component used to render an object.
Definition: default_components.hpp:237
Struct with basic information that affects all rendered entities.
Definition: renderer.hpp:62
float ambient_strength
Base light intensity that affects all objects from all directions.
Definition: renderer.hpp:64