-
Notifications
You must be signed in to change notification settings - Fork 1
/
WindowBase.hpp
38 lines (30 loc) · 913 Bytes
/
WindowBase.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once
#include <glm/glm.hpp>
#include <memory>
#include "DrawBase.hpp"
#include "Config.hpp"
#include "RenderTarget.hpp"
#include "CameraBase.hpp"
class CameraBase;
class WindowBase : public RenderTarget
{
public:
CLASS_PTRS(WindowBase)
virtual bool valid() const = 0;
virtual bool closed() const = 0;
virtual float deltaTime() const = 0;
virtual void pollEvents() = 0;
virtual void swapBuffers() const = 0;
// WindowBase does not implemente RenderTarget functions
virtual void clear(glm::vec4 clearColor) = 0;
virtual void drawFrame() = 0;
virtual void addDrawable(std::shared_ptr<DrawBase>) = 0;
virtual void clearDrawables() = 0;
virtual int getWidth() const = 0;
virtual int getHeight() const = 0;
CameraBase::Ptr getCamera() const;
void setCamera(CameraBase::Ptr camera);
protected:
WindowBase();
CameraBase::Ptr _camera;
};