Sort screenspacerenderables in correct render order

This commit is contained in:
Sebastian Piwell
2016-03-18 12:02:46 -04:00
parent 43add83e19
commit 48021a46e2
5 changed files with 18 additions and 1 deletions
@@ -138,6 +138,7 @@ public:
// Temporary fade functionality
void startFading(int direction, float fadeDuration);
void sortScreenspaceRenderables();
// This is temporary until a proper screenspace solution is found ---abock
struct {
glm::vec2 _position;
@@ -55,8 +55,11 @@ public:
virtual void update() = 0;
virtual bool isReady() const = 0;
bool isEnabled() const;
glm::vec2 euclideanPosition() const {return _euclideanPosition.value();};
glm::vec2 sphericalPosition() const {return _sphericalPosition.value();};
float depth() const {return _depth.value();};
void move(glm::vec2 v){
if(_useFlatScreen.value()){
glm::vec2 pos = _euclideanPosition.value();