Skip to content

Commit

Permalink
Adding virtual destructor on Framebuffer (TheCherno#270)
Browse files Browse the repository at this point in the history

* Adding more virtual Destructors

* Small rearrangement at Input\'s header file
  • Loading branch information
VMormoris authored Jun 16, 2020
1 parent 575ff7f commit d2557b0
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Hazel/src/Hazel/Core/Input.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ namespace Hazel {
protected:
Input() = default;
public:
virtual ~Input() = default;

Input(const Input&) = delete;
Input& operator=(const Input&) = delete;

Expand Down
2 changes: 2 additions & 0 deletions Hazel/src/Hazel/Events/Event.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ namespace Hazel {
class Event
{
public:
virtual ~Event() = default;

bool Handled = false;

virtual EventType GetEventType() const = 0;
Expand Down
2 changes: 2 additions & 0 deletions Hazel/src/Hazel/Renderer/Framebuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ namespace Hazel {
class Framebuffer
{
public:
virtual ~Framebuffer() = default;

virtual void Bind() = 0;
virtual void Unbind() = 0;

Expand Down
2 changes: 2 additions & 0 deletions Hazel/src/Hazel/Renderer/GraphicsContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ namespace Hazel {
class GraphicsContext
{
public:
virtual ~GraphicsContext() = default;

virtual void Init() = 0;
virtual void SwapBuffers() = 0;

Expand Down
2 changes: 2 additions & 0 deletions Hazel/src/Hazel/Renderer/RendererAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ namespace Hazel {
None = 0, OpenGL = 1
};
public:
virtual ~RendererAPI() = default;

virtual void Init() = 0;
virtual void SetViewport(uint32_t x, uint32_t y, uint32_t width, uint32_t height) = 0;
virtual void SetClearColor(const glm::vec4& color) = 0;
Expand Down

0 comments on commit d2557b0

Please sign in to comment.