mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-19 03:09:18 +02:00
WIP
This commit is contained in:
25
entitysystem/systems/BillboardSystem.h
Normal file
25
entitysystem/systems/BillboardSystem.h
Normal file
@@ -0,0 +1,25 @@
|
||||
#pragma once
|
||||
|
||||
#include "BaseSystem.h"
|
||||
#include "rendering/renderer.h"
|
||||
#include <unordered_map>
|
||||
#include <string>
|
||||
|
||||
// Renders Billboard components as camera-facing textured quads.
|
||||
// Instances sharing the same texture are batched into one draw call.
|
||||
class BillboardSystem : public BaseSystem
|
||||
{
|
||||
public:
|
||||
BillboardSystem();
|
||||
~BillboardSystem();
|
||||
void Render(ECWorld& world) override;
|
||||
|
||||
private:
|
||||
struct BillboardInstance {
|
||||
glm::vec3 position; // camera-relative
|
||||
float size;
|
||||
};
|
||||
|
||||
struct RenderState;
|
||||
std::unique_ptr<RenderState> m_renderState;
|
||||
};
|
||||
Reference in New Issue
Block a user