Fix clang compilation

This commit is contained in:
Bailey Harrison 2023-02-18 15:54:31 +00:00
parent 1206d4626c
commit c6e0ce9eb7
5 changed files with 21 additions and 2 deletions

View File

@ -52,7 +52,7 @@ namespace engine {
public:
System(Scene* scene, std::set<size_t> requiredComponentHashes);
~System() {}
virtual ~System() {}
System(const System&) = delete;
System& operator=(const System&) = delete;

View File

@ -23,6 +23,7 @@ namespace engine {
// Event queue interface to allow for different type queues to be in the map
class IEventQueue {
public:
virtual ~IEventQueue() {}
virtual void dispatchEvents() = 0;
};
@ -61,6 +62,11 @@ namespace engine {
std::unordered_map<uint32_t, EventHandler<T>*> m_subscribers;
struct QueuedEvent {
QueuedEvent(EventHandler<T>* handler, T event) :
handler(handler),
event(event) {}
EventHandler<T>* handler;
T event;
};

View File

@ -46,6 +46,10 @@ namespace engine::gfx {
};
struct VertexAttribDescription {
VertexAttribDescription(uint32_t location, VertexAttribFormat format, uint32_t offset) :
location(location),
format(format),
offset(offset) {}
uint32_t location;
VertexAttribFormat format;
uint32_t offset;

View File

@ -33,6 +33,15 @@ namespace engine {
std::vector<std::tuple<uint32_t, AABB, bool>> m_dynamicAABBs{};
struct PossibleCollision {
PossibleCollision(uint32_t staticEntity, AABB staticAABB, bool staticTrigger, uint32_t dynamicEntity, AABB dynamicAABB, bool dynamicTrigger) :
staticEntity(staticEntity),
staticAABB(staticAABB),
staticTrigger(staticTrigger),
dynamicEntity(dynamicEntity),
dynamicAABB(dynamicAABB),
dynamicTrigger(dynamicTrigger) {}
uint32_t staticEntity;
AABB staticAABB;
bool staticTrigger;

View File

@ -11,7 +11,7 @@ namespace engine::resources {
Shader::Shader(GFXDevice* gfx, const char* vertPath, const char* fragPath, const VertexParams& vertexParams, bool alphaBlending, bool cullBackFace)
: m_gfx(gfx)
{
int index = 0;
uint32_t index = 0;
uint32_t stride = 0;
gfx::VertexFormat vertFormat{};