KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
OpenGLContext.h
Go to the documentation of this file.
1
10#pragma once
11
13
14struct GLFWwindow;
15
16namespace Karma
17{
24 {
25 public:
35 OpenGLContext(GLFWwindow* windowHandle);
36
44 virtual void Init() override;
45
52 virtual void SwapBuffers() override;
53
60 virtual bool OnWindowResize(WindowResizeEvent& event) override;
61
62 private:
63 GLFWwindow* m_windowHandle;
64 };
65}
This file contains base class GraphicsContext.
An abstract class for creating a context for Renderer and provide graphics API.
Definition GraphicsContext.h:20
virtual void Init() override
Initializes the context.
Definition OpenGLContext.cpp:14
OpenGLContext(GLFWwindow *windowHandle)
A constructor.
Definition OpenGLContext.cpp:8
virtual void SwapBuffers() override
This function swaps the front and back buffers of the context window.
Definition OpenGLContext.cpp:25
virtual bool OnWindowResize(WindowResizeEvent &event) override
Called by Window::Resize, when the resize of a window happens.
Definition OpenGLContext.cpp:33
Event triggered when Window is resized.
Definition ApplicationEvent.h:22