CSEngine
Loading...
Searching...
No Matches
RenderMgr.h
1#pragma once
2#include "../../MacroDef.h"
3#include "RenderContainer.h"
4#include "../CoreBufferContainer.h"
5#include "../Base/RenderCoreBase.h"
6
7
8namespace CSE {
9
10 class CameraBase;
11 class SGBuffer;
12
21 class RenderMgr : public RenderContainer, public CoreBufferContainer, public CoreBase, public RenderCoreBase {
22 public:
26 explicit RenderMgr();
27 ~RenderMgr() override;
28
29 public:
33 void Init() override;
39 void SetViewport();
43 void Render() const override;
44
50 unsigned int* GetWidth() const {
51 return m_width;
52 }
53
59 unsigned int* GetHeight() const {
60 return m_height;
61 }
62
63 protected:
67 void Exterminate() override;
68
69 private:
75 void ResetBuffer(const CameraBase& camera) const;
76
80 void RenderShadows() const;
84 void RenderSubCameras() const;
88 void RenderMainCamera() const;
89 };
90}
Class for managing rendering operations.
Definition RenderMgr.h:21
void Init() override
Initialization of resources required for rendering.
Definition RenderMgr.cpp:27
unsigned int * GetWidth() const
Get the width of the screen.
Definition RenderMgr.h:50
void SetViewport()
Modify the framebuffer to fit the modified screen size.
Definition RenderMgr.cpp:41
RenderMgr()
Constructor for RenderMgr.
void Exterminate() override
Destroy all resources used for rendering.
Definition RenderMgr.cpp:96
unsigned int * GetHeight() const
Get the height of the screen.
Definition RenderMgr.h:59
void Render() const override
Rendering all stuffs.
Definition RenderMgr.cpp:47