Fixed some things in gameworld and added a new skymap.

This commit is contained in:
Tleety
2014-05-31 23:14:33 +02:00
parent 1af8d4909a
commit 2d1d4f02f3
6 changed files with 76 additions and 44 deletions
+9 -9
View File
@@ -14,6 +14,9 @@ struct RenderJob
{
friend class RenderQueue;
glm::mat4 ModelMatrix;
float Depth;
protected:
uint64_t Hash;
@@ -37,7 +40,6 @@ struct ModelJob : RenderJob
GLuint VAO;
unsigned int StartIndex;
unsigned int EndIndex;
glm::mat4 ModelMatrix;
float Transparent;
void CalculateHash() override
@@ -67,7 +69,6 @@ struct SpriteJob : RenderJob
GLuint Texture;
glm::vec4 Color;
glm::mat4 ModelMatrix;
void CalculateHash() override
{
@@ -82,31 +83,30 @@ public:
void Add(T &job)
{
job.CalculateHash();
m_Jobs.push_front(std::shared_ptr<T>(new T(job)));
Jobs.push_front(std::shared_ptr<T>(new T(job)));
}
void Sort()
{
m_Jobs.sort();
Jobs.sort();
}
void Clear()
{
m_Jobs.clear();
Jobs.clear();
}
std::forward_list<std::shared_ptr<RenderJob>>::const_iterator begin()
{
return m_Jobs.begin();
return Jobs.begin();
}
std::forward_list<std::shared_ptr<RenderJob>>::const_iterator end()
{
return m_Jobs.end();
return Jobs.end();
}
private:
std::forward_list<std::shared_ptr<RenderJob>> m_Jobs;
std::forward_list<std::shared_ptr<RenderJob>> Jobs;
};
struct RenderQueuePair