summaryrefslogtreecommitdiff
path: root/platform/macos/src
diff options
context:
space:
mode:
authorBruno de Oliveira Abinader <bruno@mapbox.com>2017-04-10 17:16:45 +0300
committerBruno de Oliveira Abinader <bruno@mapbox.com>2017-04-10 18:01:28 +0300
commita9e09c710e6b07be425640bd323200963e22d825 (patch)
tree9d92165cb231fb9cb2bf5a283e5500b2769e2d29 /platform/macos/src
parent3ad527a59ddb83d2a5add7b4c2678559b4678697 (diff)
downloadqtlocation-mapboxgl-a9e09c710e6b07be425640bd323200963e22d825.tar.gz
[ios, macos] MGLMapView size check for OpenGL 2.0 ES minimum texture size
Diffstat (limited to 'platform/macos/src')
-rw-r--r--platform/macos/src/MGLMapView.mm7
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm
index e19755044b..5d14192c61 100644
--- a/platform/macos/src/MGLMapView.mm
+++ b/platform/macos/src/MGLMapView.mm
@@ -307,8 +307,11 @@ public:
}
- (mbgl::Size)size {
- return { static_cast<uint32_t>(self.bounds.size.width),
- static_cast<uint32_t>(self.bounds.size.height) };
+ // check for minimum texture size supported by OpenGL ES 2.0
+ //
+ CGSize size = CGSizeMake(MAX(self.bounds.size.width, 64), MAX(self.bounds.size.height, 64));
+ return { static_cast<uint32_t>(size.width),
+ static_cast<uint32_t>(size.height) };
}
- (mbgl::Size)framebufferSize {