Rendering a cube basics through ENTT

This commit is contained in:
2022-10-23 12:57:58 +02:00
parent 7458254b2d
commit bc1254e427
7 changed files with 103 additions and 26 deletions

View File

@ -1,7 +1,11 @@
#pragma once
#include <glm/glm.hpp>
#include "../Graphics/Primitives/Shader.h"
namespace BarinkEngine {
struct IdentifierComponent {
std::string name;
};
struct TransformComponent {
glm::mat4& transform = glm::mat4(1.0f);
@ -17,7 +21,13 @@ namespace BarinkEngine {
struct Render3DComponent {
unsigned int VAO;
unsigned int IBO;
unsigned int ElementCount;
glm::vec3 color;
Shader shader;
Render3DComponent()
: shader(Shader("build/Debug/test.vs", "build/Debug/test.fs") )
{
}
};
struct Render2DComponent {