[android] Initialize NativeMapView with OpenGL ES 2.0 minimum texture size
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include <jni/jni.hpp>
|
||||
|
||||
#include <mbgl/map/backend_scope.hpp>
|
||||
#include <mbgl/math/minmax.hpp>
|
||||
#include <mbgl/util/constants.hpp>
|
||||
#include <mbgl/util/event.hpp>
|
||||
#include <mbgl/util/exception.hpp>
|
||||
@@ -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<uint32_t>(width), static_cast<uint32_t>(height) });
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user