KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Karma::GraphicsContext Class Referenceabstract

An abstract class for creating a context for Renderer and provide graphics API. More...

#include <GraphicsContext.h>

Inheritance diagram for Karma::GraphicsContext:

Public Member Functions

virtual void Init ()=0
 For initializing Renderer and instantiating relevant objects.
 
virtual void SwapBuffers ()=0
 This function swaps the front and back buffers of the specified window. If the swap interval is greater than zero, the GPU driver waits the specified number of screen updates before swapping the buffers.
 
virtual bool OnWindowResize (WindowResizeEvent &event)=0
 Calls glViewport function which specifies the affine transformation of x and y from normalized device coordinates to window coordinates.
 
virtual ~GraphicsContext ()
 A destructor.
 

Detailed Description

An abstract class for creating a context for Renderer and provide graphics API.

Constructor & Destructor Documentation

◆ ~GraphicsContext()

virtual Karma::GraphicsContext::~GraphicsContext ( )
inlinevirtual

A destructor.

Since
Karma 1.0.0

Member Function Documentation

◆ Init()

virtual void Karma::GraphicsContext::Init ( )
pure virtual

For initializing Renderer and instantiating relevant objects.

Since
Karma 1.0.0

Implemented in Karma::OpenGLContext, and Karma::VulkanContext.

◆ OnWindowResize()

virtual bool Karma::GraphicsContext::OnWindowResize ( WindowResizeEvent & event)
pure virtual

Calls glViewport function which specifies the affine transformation of x and y from normalized device coordinates to window coordinates.

Todo
Seems OpenGL specific. Either think about usage in Vulkan or re design
Since
Karma 1.0.0

Implemented in Karma::OpenGLContext, and Karma::VulkanContext.

◆ SwapBuffers()

virtual void Karma::GraphicsContext::SwapBuffers ( )
pure virtual

This function swaps the front and back buffers of the specified window. If the swap interval is greater than zero, the GPU driver waits the specified number of screen updates before swapping the buffers.

Todo
This seems to be an OpenGL specific call. Need to design api accordingly
Since
Karma 1.0.0

Implemented in Karma::OpenGLContext, and Karma::VulkanContext.


The documentation for this class was generated from the following file: