Merge remote-tracking branch 'origin/master' into gui
Conflicts: include/Core/Engine.h include/Core/RenderQueue.h include/Core/Renderer.h src/game/Core/Renderer.cpp
This commit is contained in:
@@ -130,6 +130,18 @@ struct FrameJob : SpriteJob
|
||||
}
|
||||
};
|
||||
|
||||
struct WaterParticleJob : RenderJob
|
||||
{
|
||||
glm::vec3 Position;
|
||||
glm::vec4 Color;
|
||||
glm::mat4 ModelMatrix;
|
||||
|
||||
void CalculateHash() override
|
||||
{
|
||||
Hash = 0;
|
||||
}
|
||||
};
|
||||
|
||||
class RenderQueue
|
||||
{
|
||||
public:
|
||||
@@ -138,6 +150,7 @@ public:
|
||||
{
|
||||
job.CalculateHash();
|
||||
Jobs.push_back(std::shared_ptr<T>(new T(job)));
|
||||
m_Size++;
|
||||
}
|
||||
|
||||
void Sort()
|
||||
@@ -148,8 +161,10 @@ public:
|
||||
void Clear()
|
||||
{
|
||||
Jobs.clear();
|
||||
m_Size = 0;
|
||||
}
|
||||
|
||||
int Size() const { return m_Size; }
|
||||
std::list<std::shared_ptr<RenderJob>>::const_iterator begin()
|
||||
{
|
||||
return Jobs.begin();
|
||||
@@ -161,6 +176,9 @@ public:
|
||||
}
|
||||
|
||||
std::list<std::shared_ptr<RenderJob>> Jobs;
|
||||
|
||||
private:
|
||||
int m_Size = 0;
|
||||
};
|
||||
|
||||
struct RenderQueueCollection
|
||||
|
||||
Reference in New Issue
Block a user