feat: entt library
This commit is contained in:
@ -2,16 +2,16 @@
|
||||
#define RENDERER_H_
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
#include <entt/entity/registry.hpp>
|
||||
|
||||
#include "renderer/shader.h"
|
||||
#include "ecs/entity.h"
|
||||
|
||||
// TODO: make static or singleton
|
||||
class Renderer {
|
||||
public:
|
||||
Renderer(ecs::Entity& light, ecs::Entity& camera);
|
||||
Renderer();
|
||||
|
||||
void RenderLight();
|
||||
void RenderEntity(const ecs::Entity& entity);
|
||||
void Render(entt::registry& registry);
|
||||
|
||||
void OnWindowResized(int w, int h);
|
||||
private:
|
||||
@ -20,9 +20,6 @@ private:
|
||||
glm::mat4 m_model;
|
||||
glm::mat4 m_proj;
|
||||
glm::mat4 m_view;
|
||||
|
||||
ecs::Entity& m_light;
|
||||
ecs::Entity& m_camera;
|
||||
};
|
||||
|
||||
#endif // RENDERER_H_
|
@ -35,6 +35,7 @@ private:
|
||||
void CreateNewMesh(const std::string& materialName);
|
||||
public:
|
||||
void Render(Shader& shader);
|
||||
[[nodiscard]] inline const std::string Name() const { return m_name; }
|
||||
private:
|
||||
std::string m_name;
|
||||
std::vector<glm::vec3> m_vertices;
|
||||
|
Reference in New Issue
Block a user