83 void SetShader(
const std::string& shaderPath);
114 inline static std::string
GetType() {
return "Renderer"; }
Defines the GameObject class and its related components.
The Camera class represents a camera in the game world.
Definition Camera.h:9
Class representing a game object.
Definition GameObject.h:68
The Renderer class is responsible for rendering GameObjects using a specified shader.
Definition Renderer.h:10
void Unuse()
Sets the default renderer as the current renderer. The default renderer is managed by the Core fronte...
Definition Renderer.cpp:28
static void Destroy()
Destroys the default renderer.
Definition Renderer.cpp:130
void DrawOnDefaultFrame()
Draws on the default framebuffer.
Definition Renderer.cpp:32
void SetShader(const std::string &shaderPath)
Sets the shader for this renderer.
Definition Renderer.cpp:20
void CaptureOnCamFrame()
Captures on the camera framebuffer.
Definition Renderer.cpp:63
Renderer()=default
Default constructor for the Renderer class.
Camera * target
The target camera for rendering.
Definition Renderer.h:36
void Use()
Sets this renderer as the current renderer.
Definition Renderer.cpp:24
Renderer * operator()(Renderer *renderer, bool captureOnDefaultFrame=0)
Operator overload for adding a renderer as a decorator.
Definition Renderer.cpp:102
static Renderer * currentRenderer
The current renderer.
Definition Renderer.h:108
static void Init()
Initializes the default renderer.
Definition Renderer.cpp:124
Renderer(const std::string &shaderPath)
Constructor for the Renderer class that takes a shader path as input.
void SetUp()
Adds components to the componentContainer.
Definition Renderer.cpp:12
static Renderer * defaultRenderer
The default renderer.
Definition Renderer.h:103
static std::string GetType()
Gets the type of the Renderer class.
Definition Renderer.h:114
GameObject componentContainer
The container for the GameObject components.
Definition Renderer.h:31
fVec2 stretchCoeff
The stretch coefficients for rendering.
Definition Renderer.h:41
~Renderer()
Destructor for the Renderer class.
Definition Renderer.cpp:97