diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-01-16 15:08:17 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-01-16 15:08:17 -0800 |
commit | cf166717b8e616a3599038ffff440b50251ed7b8 (patch) | |
tree | 74d06c35bdf0d6f970c63c988baef26650515afb /platform/darwin/src/MGLOpenGLStyleLayer.mm | |
parent | bd71eb8681529ab70ff892b12128f8b7a5faa4c7 (diff) | |
parent | 7ef2843e6a62116667be6a2c12de085951fdd5ea (diff) | |
download | qtlocation-mapboxgl-cf166717b8e616a3599038ffff440b50251ed7b8.tar.gz |
Merge branch '1ec5-release-ios-v3.4.0-beta.7'
Diffstat (limited to 'platform/darwin/src/MGLOpenGLStyleLayer.mm')
-rw-r--r-- | platform/darwin/src/MGLOpenGLStyleLayer.mm | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/platform/darwin/src/MGLOpenGLStyleLayer.mm b/platform/darwin/src/MGLOpenGLStyleLayer.mm index 745eacbf4e..5d81eb85ea 100644 --- a/platform/darwin/src/MGLOpenGLStyleLayer.mm +++ b/platform/darwin/src/MGLOpenGLStyleLayer.mm @@ -4,6 +4,7 @@ #import "MGLStyle_Private.h" #import "MGLStyleLayer_Private.h" +#include <mbgl/map/map.hpp> #include <mbgl/style/layers/custom_layer.hpp> #include <mbgl/math/wrap.hpp> @@ -52,10 +53,19 @@ void MGLFinishCustomStyleLayer(void *context) { } /** - An `MGLOpenGLStyleLayer` is a style layer that is rendered by OpenGL code in - Objective-C blocks or Swift closures that you specify. You may initialize a new - OpenGL style layer to add to an `MGLStyle` or obtain one from an `MGLMapView`’s - current style using the `-[MGLStyle layerWithIdentifier:]` method. + An `MGLOpenGLStyleLayer` is a style layer that is rendered by OpenGL code that + you provide. + + By default, this class does nothing. You can subclass this class to provide + custom OpenGL drawing code that is run on each frame of the map. Your subclass + should override the `-didMoveToMapView:`, `-willMoveFromMapView:`, and + `-drawInMapView:withContext:` methods. + + You can access an existing OpenGL style layer using the + `-[MGLStyle layerWithIdentifier:]` method if you know its identifier; + otherwise, find it using the `MGLStyle.layers` property. You can also create a + new OpenGL style layer and add it to the style using a method such as + `-[MGLStyle addLayer:]`. @warning This API is undocumented and therefore unsupported. It may change at any time without notice. |