Files
MapLibreParticleLab/platform/darwin/src/MLNOpenGLStyleLayer.h
mwilsnd 20d9e1028c Platform flattening overhaul (#1393)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Bart Louwers <bart@emeel.net>
2023-07-26 17:50:34 +02:00

52 lines
1.2 KiB
Objective-C

#import <Foundation/Foundation.h>
#import <CoreLocation/CoreLocation.h>
#import <QuartzCore/QuartzCore.h>
#import "MLNFoundation.h"
#import "MLNStyleValue.h"
#import "MLNStyleLayer.h"
#import "MLNGeometry.h"
NS_ASSUME_NONNULL_BEGIN
@class MLNMapView;
@class MLNStyle;
typedef struct MLNStyleLayerDrawingContext {
CGSize size;
CLLocationCoordinate2D centerCoordinate;
double zoomLevel;
CLLocationDirection direction;
CGFloat pitch;
CGFloat fieldOfView;
MLNMatrix4 projectionMatrix;
} MLNStyleLayerDrawingContext;
MLN_EXPORT
@interface MLNOpenGLStyleLayer : MLNStyleLayer
@property (nonatomic, weak, readonly) MLNStyle *style;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#if TARGET_OS_IPHONE
@property (nonatomic, readonly) EAGLContext *context;
#else
@property (nonatomic, readonly) CGLContextObj context;
#endif
#pragma clang diagnostic pop
- (instancetype)initWithIdentifier:(NSString *)identifier;
- (void)didMoveToMapView:(MLNMapView *)mapView;
- (void)willMoveFromMapView:(MLNMapView *)mapView;
- (void)drawInMapView:(MLNMapView *)mapView withContext:(MLNStyleLayerDrawingContext)context;
- (void)setNeedsDisplay;
@end
NS_ASSUME_NONNULL_END