Karma Engine
Loading...
Searching...
No Matches
RenderCommand.h
1#pragma once
2
3#include "krpch.h"
4
5#include "RendererAPI.h"
6
7namespace Karma
8{
9 class KARMA_API RenderCommand
10 {
11 public:
12 static void Init();
13 static void DeInit();
14
15 inline static void SetClearColor(const glm::vec4& color)
16 {
17 s_RendererAPI->SetClearColor(color);
18 }
19 inline static void Clear()
20 {
21 s_RendererAPI->Clear();
22 }
23 inline static void BeginScene()
24 {
25 s_RendererAPI->BeginScene();
26 }
27 inline static void DrawIndexed(const std::shared_ptr<VertexArray>& vertexArray)
28 {
29 s_RendererAPI->DrawIndexed(vertexArray);
30 }
31 static void EndScene()
32 {
33 s_RendererAPI->EndScene();
34 }
35
36 inline static glm::vec4& GetClearColor()
37 {
38 return s_RendererAPI->GetClearColor();
39 }
40
41 inline static RendererAPI* GetRendererAPI() { return s_RendererAPI; }
42
43 private:
44 static RendererAPI* s_RendererAPI;
45 };
46}
Definition RenderCommand.h:10
Definition RendererAPI.h:11