Working on RenderTarget example

This commit is contained in:
2022-10-19 00:43:16 -07:00
parent a86574128d
commit f0cbae4cf8
17 changed files with 235 additions and 26 deletions

View File

@ -5,6 +5,7 @@
#pragma once
#include "scene/SceneItemComponent.hpp"
#include "display/RenderTarget.hpp"
namespace Dawn {
enum CameraType {
@ -15,6 +16,7 @@ namespace Dawn {
class Camera : public SceneItemComponent {
public:
glm::mat4 projection;
std::shared_ptr<RenderTarget> target = nullptr;
// Perspective
enum CameraType type = CAMERA_TYPE_PERSPECTIVE;
@ -42,6 +44,8 @@ namespace Dawn {
*/
void updateProjection();
std::shared_ptr<RenderTarget> getRenderTarget();
/**
* Returs the aspect ratio of the camera.
*