Catos Engine (Source) 0.0.1
Lightweight Game engine
Loading...
Searching...
No Matches
renderer.h
Go to the documentation of this file.
1//
2// Created by allos on 10/16/2024.
3//
4
5#pragma once
6
9
10namespace catos {
11
13 enum class RenderBackendType: unsigned int {
14 UNKNOWN = 0,
15 OPENGL_4_2 = 1,
16 };
17
19 enum RenderStatus: unsigned int {
21
23 };
24
25
29
30
32 class Renderer {
33
34 public:
35
37 static Renderer& getInstance();
38 ~Renderer();
39
41 RenderStatus init(const RendererCreateInfo& createInfo);
42
44 RenderStatus renderObjects(const RenderPipeline& pipeline, void* data, unsigned int objectAmount);
45
48
49
50 private:
51
52 void setupFinalRenderPlane();
53
54 bool initialized = false;
55
56 unsigned int renderVAO;
57 unsigned int renderVBO;
58 Shader screenShader;
59
60 };
61
62}
63
Definition application.h:13
RenderStatus
The statuses of the renderer's operation.
Definition renderer.h:19
@ SUCCESSFUL
Definition renderer.h:20
@ RENDERER_ALREADY_INITIALIZED
Definition renderer.h:22
RenderBackendType
What backend the renderer should use. NOTE: ONLY OPENGL 4.2 SUPPORTED.
Definition renderer.h:13
Definition renderer.h:26
RenderBackendType backendType
Definition renderer.h:27
The renderer is the Master class that handles everything getting drawn properly.
Definition renderer.h:32
~Renderer()
Definition renderer.cpp:48
RenderStatus init(const RendererCreateInfo &createInfo)
If the renderer isnt already initialized then it initializes.
Definition renderer.cpp:55
static Renderer & getInstance()
Singleton.
Definition renderer.cpp:42
RenderStatus renderPassToScreen(RenderPass &pass)
Renders the given pass to the screen. NOTE: its public for overriding.
Definition renderer.cpp:90
RenderStatus renderObjects(const RenderPipeline &pipeline, void *data, unsigned int objectAmount)
Renders all objects via the pipeline given.
Definition renderer.cpp:82
Definition renderPass.h:45
Definition renderPipeline.h:10
Definition shader.h:35