Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
Public Member Functions | Public Attributes | Friends | List of all members
Engine::Renderer Class Reference

This is the main renderer parent class which contains the base methods required for a renderer. NOTE: Only the Engine can create this object. More...

#include <Renderer.hpp>

Public Member Functions

virtual void RendererBegin ()
 This method is used to initialize the renderer for the current frame. More...
 
virtual void RendererBegin (const glm::mat4x4 &view, const glm::mat4x4 &projection)
 This method is used to initialize the renderer for the current frame. More...
 
virtual void Render ()
 This method is used to send draw data to the GPU. More...
 
virtual void Render (const glm::mat4x4 &modelMatrix, eastl::shared_ptr< Model > model, const glm::vec4 &mainColor=glm::vec4(1, 1, 1, 1))
 This method is used to send draw data to the GPU. More...
 
virtual void RendererEnd ()
 This method is used to reset the current frame, so it's ready for the next frame. More...
 

Public Attributes

Sharp::Event< void > OnRender
 This event is called whenever the Renderer is ready to start rendering. More...
 

Friends

class Engine
 

Detailed Description

This is the main renderer parent class which contains the base methods required for a renderer. NOTE: Only the Engine can create this object.

Definition at line 15 of file Renderer.hpp.

Member Function Documentation

void Engine::Renderer::Render ( )
virtual

This method is used to send draw data to the GPU.

Definition at line 22 of file Renderer.cpp.

void Engine::Renderer::Render ( const glm::mat4x4 &  modelMatrix,
eastl::shared_ptr< Model model,
const glm::vec4 &  mainColor = glm::vec4(1, 1, 1, 1) 
)
virtual

This method is used to send draw data to the GPU.

Parameters
modelMatrixThe model matrix of the object you want to draw.
modelThe model to render.
mainColorThe color you want to render your model in. By default this is set to white.

Definition at line 26 of file Renderer.cpp.

void Engine::Renderer::RendererBegin ( )
virtual

This method is used to initialize the renderer for the current frame.

Definition at line 14 of file Renderer.cpp.

void Engine::Renderer::RendererBegin ( const glm::mat4x4 &  view,
const glm::mat4x4 &  projection 
)
virtual

This method is used to initialize the renderer for the current frame.

Parameters
viewThe view matrix used for this frame.
projectionThe projection matrix used for this frame.

Definition at line 18 of file Renderer.cpp.

void Engine::Renderer::RendererEnd ( )
virtual

This method is used to reset the current frame, so it's ready for the next frame.

Definition at line 30 of file Renderer.cpp.

Friends And Related Function Documentation

friend class Engine
friend

Definition at line 18 of file Renderer.hpp.

Member Data Documentation

Sharp::Event<void> Engine::Renderer::OnRender

This event is called whenever the Renderer is ready to start rendering.

Definition at line 68 of file Renderer.hpp.


The documentation for this class was generated from the following files: