Now render water through it's own buffer. Not currently visable through finaltexture. Also added a white texture to render the water.

This commit is contained in:
tleety
2015-09-23 18:01:15 +02:00
parent 8e2eb63c5e
commit d473e3711c
9 changed files with 303 additions and 26 deletions
+13
View File
@@ -119,6 +119,12 @@ struct WaterParticleJob : RenderJob
{
glm::vec3 Position;
glm::vec4 Color;
glm::mat4 ModelMatrix;
void CalculateHash() override
{
Hash = 0;
}
};
class RenderQueue
@@ -129,6 +135,7 @@ public:
{
job.CalculateHash();
Jobs.push_front(std::shared_ptr<T>(new T(job)));
m_Size++;
}
void Sort()
@@ -139,8 +146,11 @@ public:
void Clear()
{
Jobs.clear();
m_Size = 0;
}
int Size() const { return m_Size; }
std::forward_list<std::shared_ptr<RenderJob>>::const_iterator begin()
{
return Jobs.begin();
@@ -152,6 +162,9 @@ public:
}
std::forward_list<std::shared_ptr<RenderJob>> Jobs;
private:
int m_Size = 0;
};
struct RenderQueueCollection