Testing textures and events
This commit is contained in:
@ -14,9 +14,13 @@ namespace Dawn {
|
||||
};
|
||||
|
||||
class Camera : public SceneItemComponent {
|
||||
protected:
|
||||
std::shared_ptr<RenderTarget> target = nullptr;
|
||||
|
||||
void onRenderTargetResize(RenderTarget &target, float_t w, float_t h);
|
||||
|
||||
public:
|
||||
glm::mat4 projection;
|
||||
std::shared_ptr<RenderTarget> target = nullptr;
|
||||
|
||||
// Perspective
|
||||
enum CameraType type = CAMERA_TYPE_PERSPECTIVE;
|
||||
@ -55,6 +59,13 @@ namespace Dawn {
|
||||
*/
|
||||
RenderTarget & getRenderTarget();
|
||||
|
||||
/**
|
||||
* Updates the render target for the camera to use.
|
||||
*
|
||||
* @param renderTarget Render target for this camera to draw to.
|
||||
*/
|
||||
void setRenderTarget(std::shared_ptr<RenderTarget> renderTarget);
|
||||
|
||||
/**
|
||||
* Returs the aspect ratio of the camera.
|
||||
*
|
||||
@ -66,5 +77,10 @@ namespace Dawn {
|
||||
* Event triggered by the scene item when the item is added to the scene.
|
||||
*/
|
||||
void start() override;
|
||||
|
||||
/**
|
||||
* Disposes a previously initialized camera.
|
||||
*/
|
||||
~Camera();
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user