Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'drape/hw_texture.cpp')
-rw-r--r--drape/hw_texture.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/drape/hw_texture.cpp b/drape/hw_texture.cpp
index c55c5cf518..da6cedad3a 100644
--- a/drape/hw_texture.cpp
+++ b/drape/hw_texture.cpp
@@ -8,6 +8,10 @@
#include "base/logging.hpp"
#include "base/math.hpp"
+#ifdef DEBUG
+#include "3party/glm/glm/gtx/bit.hpp"
+#endif
+
#if defined(OMIM_OS_IPHONE)
#include "hw_texture_ios.hpp"
#endif
@@ -147,11 +151,8 @@ void OpenGLHWTexture::Create(Params const & params, ref_ptr<void> data)
{
TBase::Create(params, data);
- if (!GLExtensionsList::Instance().IsSupported(GLExtensionsList::TextureNPOT))
- {
- m_width = my::NextPowOf2(m_width);
- m_height = my::NextPowOf2(m_height);
- }
+ ASSERT(glm::isPowerOfTwo(static_cast<int>(m_width)), (m_width));
+ ASSERT(glm::isPowerOfTwo(static_cast<int>(m_height)), (m_height));
m_textureID = GLFunctions::glGenTexture();
Bind();