|
KarmaEngine
Game Engine for practical learning and research purposes
|
An abstract class for a renderer. More...
#include <RendererAPI.h>

Public Types | |
| enum class | API { None = 0 , OpenGL = 1 , Vulkan = 2 } |
| The rendering API used by the Engine. More... | |
Public Member Functions | |
| virtual | ~RendererAPI () |
| A destructor. | |
| virtual void | SetClearColor (const glm::vec4 &color)=0 |
| Set the color to be used for clear (rendering) screen. | |
| virtual void | Clear ()=0 |
| Clear the rendering screen. | |
| virtual void | BeginScene ()=0 |
| Setting up resources for rendering of a scene. | |
| virtual void | DrawIndexed (std::shared_ptr< VertexArray > vertexArray)=0 |
| Routine for drawing primitives. | |
| virtual void | EndScene ()=0 |
| Instructions for end of the scene. | |
| glm::vec4 & | GetClearColor () const |
| Getter for m_ClearColor variable. | |
Static Public Member Functions | |
| static API | GetAPI () |
| Getter for rendering api being used. | |
Static Protected Attributes | |
| static glm::vec4 | m_ClearColor = { 0.0f, 0.0f, 0.0f, 0.0f } |
An abstract class for a renderer.
|
strong |
The rendering API used by the Engine.
| Enumerator | |
|---|---|
| None | No rendering.
|
| OpenGL | OpenGL (https://www.opengl.org) |
| Vulkan | Vulkan (https://www.vulkan.org) |
|
inlinevirtual |
A destructor.
|
pure virtual |
Setting up resources for rendering of a scene.
Implemented in Karma::OpenGLRendererAPI, and Karma::VulkanRendererAPI.
|
pure virtual |
Clear the rendering screen.
Implemented in Karma::OpenGLRendererAPI, and Karma::VulkanRendererAPI.
|
pure virtual |
Routine for drawing primitives.
Implemented in Karma::OpenGLRendererAPI, and Karma::VulkanRendererAPI.
|
pure virtual |
Instructions for end of the scene.
Implemented in Karma::OpenGLRendererAPI, and Karma::VulkanRendererAPI.
|
inlinestatic |
Getter for rendering api being used.
|
inline |
Getter for m_ClearColor variable.
|
pure virtual |
Set the color to be used for clear (rendering) screen.
| color | The color to be used for clearing |
Implemented in Karma::OpenGLRendererAPI, and Karma::VulkanRendererAPI.