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:
2015-09-25 02:27:00 +02:00
24 changed files with 1716 additions and 83 deletions
+18
View File
@@ -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