diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-12-11 12:02:43 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:34:52 +0300 |
commit | 327514dcc366c09fa10fe9d04e2e3e3c7c8c18bf (patch) | |
tree | 721e18b152827b432c1d3ebad8f1b08ed80587ef /drape | |
parent | 270c4915615e8e74c9605616f469a8e5c3b971a3 (diff) |
[drape] not hardcoded texture filtration using
Diffstat (limited to 'drape')
-rw-r--r-- | drape/dynamic_texture.hpp | 2 | ||||
-rw-r--r-- | drape/stipple_pen_resource.cpp | 10 | ||||
-rw-r--r-- | drape/stipple_pen_resource.hpp | 2 | ||||
-rw-r--r-- | drape/texture_of_colors.cpp | 10 | ||||
-rw-r--r-- | drape/texture_of_colors.hpp | 2 |
5 files changed, 25 insertions, 1 deletions
diff --git a/drape/dynamic_texture.hpp b/drape/dynamic_texture.hpp index 60bd4ad6b2..7dcd12f477 100644 --- a/drape/dynamic_texture.hpp +++ b/drape/dynamic_texture.hpp @@ -13,7 +13,7 @@ public: : m_indexer(size) { Create(size.x, size.y, format); - SetFilterParams(gl_const::GLNearest, gl_const::GLNearest); + SetFilterParams(m_indexer.GetMinFilter(), m_indexer.GetMagFilter()); } virtual ResourceInfo const * FindResource(Key const & key) const diff --git a/drape/stipple_pen_resource.cpp b/drape/stipple_pen_resource.cpp index 3ec2a980e0..36a2e4d391 100644 --- a/drape/stipple_pen_resource.cpp +++ b/drape/stipple_pen_resource.cpp @@ -231,6 +231,16 @@ void StipplePenIndex::UploadResources(RefPointer<Texture> texture) m_pendingNodes.clear(); } +glConst StipplePenIndex::GetMinFilter() const +{ + return gl_const::GLNearest; +} + +glConst StipplePenIndex::GetMagFilter() const +{ + return gl_const::GLNearest; +} + string DebugPrint(StipplePenHandle const & key) { ostringstream out; diff --git a/drape/stipple_pen_resource.hpp b/drape/stipple_pen_resource.hpp index bb585bbdf2..094542325f 100644 --- a/drape/stipple_pen_resource.hpp +++ b/drape/stipple_pen_resource.hpp @@ -101,6 +101,8 @@ public: StipplePenIndex(m2::PointU const & canvasSize) : m_packer(canvasSize) {} StipplePenResourceInfo const * MapResource(StipplePenKey const & key); void UploadResources(RefPointer<Texture> texture); + glConst GetMinFilter() const; + glConst GetMagFilter() const; private: typedef MasterPointer<StipplePenResourceInfo> TResourcePtr; diff --git a/drape/texture_of_colors.cpp b/drape/texture_of_colors.cpp index b837db0d28..cfa2458e8b 100644 --- a/drape/texture_of_colors.cpp +++ b/drape/texture_of_colors.cpp @@ -141,6 +141,16 @@ void ColorPalette::UploadResources(RefPointer<Texture> texture) m_pendingNodes.clear(); } +glConst ColorPalette::GetMinFilter() const +{ + return gl_const::GLNearest; +} + +glConst ColorPalette::GetMagFilter() const +{ + return gl_const::GLNearest; +} + void ColorPalette::MoveCursor() { m_cursor.x += RESOURCE_SIZE; diff --git a/drape/texture_of_colors.hpp b/drape/texture_of_colors.hpp index 5100239d1e..80e6d2b574 100644 --- a/drape/texture_of_colors.hpp +++ b/drape/texture_of_colors.hpp @@ -31,6 +31,8 @@ public: ~ColorPalette(); ColorResourceInfo const * MapResource(ColorKey const & key); void UploadResources(RefPointer<Texture> texture); + glConst GetMinFilter() const; + glConst GetMagFilter() const; void SetIsDebug(bool isDebug) { m_isDebug = isDebug; } |