entity system!

This commit is contained in:
Asuro
2025-02-09 19:30:18 +01:00
parent d1270c47a9
commit 90bc5753a9
19 changed files with 306 additions and 67 deletions

View File

@@ -77,19 +77,25 @@ namespace Game
}
};
struct RenderState
struct Model
{
bgfx::VertexBufferHandle VertexBuffer;
bgfx::IndexBufferHandle IndexBuffer;
bgfx::VertexLayout VertLayout;
};
struct Material
{
bgfx::ProgramHandle Shader;
uint64_t State = 0;
};
class GameRendering
{
private:
bgfx::VertexLayout VertLayout;
bgfx::VertexBufferHandle VertexBuffer;
bgfx::IndexBufferHandle IndexBuffer;
bgfx::ProgramHandle Shader;
Material Materials[8];
Model Models[8];
BgfxCallback Callback;
RenderState State;
public:
void Setup();
void Update();