diff options
author | Minh Nguyễn <mxn@1ec5.org> | 2017-01-16 11:38:35 -0800 |
---|---|---|
committer | Minh Nguyễn <mxn@1ec5.org> | 2017-01-16 11:38:35 -0800 |
commit | 7ef2843e6a62116667be6a2c12de085951fdd5ea (patch) | |
tree | 40eca249e044e2706efd1193d617e6eb8e59d708 /platform/darwin/src/MGLOpenGLStyleLayer.mm | |
parent | 76301b252cbc4bc3ae1fc84322bcbcdbd26cae8a (diff) | |
parent | 13b97dd0cebffe36b187bdb74923910def6bd87b (diff) | |
download | qtlocation-mapboxgl-7ef2843e6a62116667be6a2c12de085951fdd5ea.tar.gz |
Merge branch 'release-ios-v3.4.0' into 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. |