Ocular Engine
Renderer.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_CORE_RENDERER__H__
19 #define __H__OCULAR_CORE_RENDERER__H__
20 
21 #include "Math/Matrix4x4.hpp"
22 #include <vector>
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
32  namespace Graphics
33  {
34  class UniformBuffer;
35  class Material;
36  }
37 
42  namespace Core
43  {
44  class SceneObject;
45 
49  class Renderer
50  {
51  public:
52 
53  Renderer();
54  ~Renderer();
55 
56  virtual void render(std::vector<SceneObject*>& objects) = 0;
57  virtual void render(std::vector<SceneObject*>& objects, Graphics::Material* material) = 0;
58 
59  protected:
60 
64  void sort(std::vector<SceneObject*>& objects);
65 
69  void bindUniforms(SceneObject* object);
70 
71  //------------------------------------------------------------
72 
73  Graphics::UniformBuffer* m_UniformBufferPerObject;
74 
75  Math::Matrix4x4 m_CurrViewMatrix;
76  Math::Matrix4x4 m_CurrProjMatrix;
77 
78  private:
79  };
80  }
84 }
89 //------------------------------------------------------------------------------------------
90 
91 #endif
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
void sort(std::vector< SceneObject * > &objects)
Definition: Renderer.cpp:60
Definition: SceneObject.hpp:93
A 4x4 column-major float matrix.
Definition: Matrix4x4.hpp:64
Definition: Renderer.hpp:49
Generic buffer for storing and binding of shader uniforms.
Definition: UniformBuffer.hpp:73
Definition: Material.hpp:62