return refs to avoid matrix allocation/deallocation for untranslated layers

refs #189
This commit is contained in:
Konstantin Käfer
2014-05-14 17:21:12 +02:00
parent a27f8798ff
commit a9d559fe51
6 changed files with 11 additions and 10 deletions

View File

@@ -89,7 +89,7 @@ public:
bool needsAnimation() const;
private:
void setupShaders();
mat4 translatedMatrix(const std::array<float, 2> &translation, const Tile::ID &id, TranslateAnchor anchor = TranslateAnchor::Map);
const mat4 &translatedMatrix(const std::array<float, 2> &translation, const Tile::ID &id, TranslateAnchor anchor = TranslateAnchor::Map);
void prepareTile(const Tile& tile);
void useProgram(uint32_t program);
@@ -98,6 +98,7 @@ private:
public:
mat4 matrix;
mat4 vtxMatrix;
mat4 projMatrix;
mat4 nativeMatrix;
mat4 extrudeMatrix;