Engine
Frameworkcreatedbymeusableforthecreationofsimplegames.CurrentlysupportsOpenGL(Verysimple)andVulkan.
Renderer.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "Engine/api.hpp"
4 #include "Engine/Model/Model.hpp"
7 #include <ThirdParty/glm/glm/glm.hpp>
8 #include <ThirdParty/EASTL-master/include/EASTL/shared_ptr.h>
9 
10 namespace Engine
11 {
16  {
17  private:
18  friend class Engine;
19 #ifdef USING_OPENGL
20  friend class OpenGLRenderer;
21 #endif
22 #ifdef USING_VULKAN
23  friend class VulkanRenderer;
24 #endif
25 
26  Renderer() noexcept;
27  Renderer(Renderer const &other) = default;
28  Renderer(Renderer &&other) noexcept = default;
29  virtual ~Renderer() noexcept = default;
30  public:
31 
32  //Should probably add the Shader reference for vertex and fragment to this, so they can be sent to the GPU
33  //Possibly also want to add an Entity reference, so you could send it's data (mesh and texture) to the GPU as well.
34  //At least that's how it worked in OpenGL
38  virtual void RendererBegin();
44  virtual void RendererBegin(const glm::mat4x4& view, const glm::mat4x4& projection);
45 
46  //Used to render the selected Shader & Entity combination defined in RendererBegin()
50  virtual void Render();
57  virtual void Render(const glm::mat4x4& modelMatrix, eastl::shared_ptr<Model> model, const glm::vec4& mainColor = glm::vec4(1, 1, 1, 1));
58 
59  //Used to unbind the current selected Shader & Entity combination defined in RendererBegin()
63  virtual void RendererEnd();
64 
68  Sharp::Event<void> OnRender;
69  };
70 } //namespace Engine
#define ENGINE_API
Definition: api.hpp:25
This object is a storage container for meshes.
Definition: Model.hpp:15
This is the main renderer parent class which contains the base methods required for a renderer...
Definition: Renderer.hpp:15
Definition: Event.hpp:29
IMGUI_API void Render()
Definition: imgui.cpp:2769