From f1bcca1465b5824c425b395ee6700a1431ca5509 Mon Sep 17 00:00:00 2001 From: Bruno de Oliveira Abinader Date: Thu, 6 Apr 2017 15:47:54 +0300 Subject: [android] Initialize NativeMapView with OpenGL ES 2.0 minimum texture size --- platform/android/src/native_map_view.cpp | 5 +++-- platform/android/src/native_map_view.hpp | 10 ++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/platform/android/src/native_map_view.cpp b/platform/android/src/native_map_view.cpp index 861f068cb1..9f6328cd51 100755 --- a/platform/android/src/native_map_view.cpp +++ b/platform/android/src/native_map_view.cpp @@ -15,6 +15,7 @@ #include #include +#include #include #include #include @@ -320,8 +321,8 @@ void NativeMapView::update(jni::JNIEnv&) { } void NativeMapView::resizeView(jni::JNIEnv&, int w, int h) { - width = w; - height = h; + width = util::max(64, w); + height = util::max(64, h); map->setSize({ static_cast(width), static_cast(height) }); } diff --git a/platform/android/src/native_map_view.hpp b/platform/android/src/native_map_view.hpp index d48d5a107c..770065a8a3 100755 --- a/platform/android/src/native_map_view.hpp +++ b/platform/android/src/native_map_view.hpp @@ -315,10 +315,12 @@ private: bool firstRender = true; double fps = 0.0; - int width = 0; - int height = 0; - int fbWidth = 0; - int fbHeight = 0; + // Minimum texture size according to OpenGL ES 2.0 specification. + int width = 64; + int height = 64; + int fbWidth = 64; + int fbHeight = 64; + bool framebufferSizeChanged = true; int availableProcessors = 0; -- cgit v1.2.1