Files
MapLibreParticleLab/platform/macos/src/MLNMapView+OpenGL.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

42 lines
1.3 KiB
Objective-C

#import "MLNMapView+Impl.h"
#import "MLNMapView_Private.h"
#include <mbgl/gfx/renderable.hpp>
#include <mbgl/gl/renderer_backend.hpp>
/// Adapter responsible for bridging calls from mbgl to MLNMapView and Cocoa.
class MLNMapViewOpenGLImpl final : public MLNMapViewImpl,
public mbgl::gl::RendererBackend,
public mbgl::gfx::Renderable {
public:
MLNMapViewOpenGLImpl(MLNMapView*);
~MLNMapViewOpenGLImpl() override = default;
public:
void restoreFramebufferBinding();
// Implementation of mbgl::gfx::RendererBackend
public:
mbgl::gfx::Renderable& getDefaultRenderable() override { return *this; }
private:
void activate() override;
void deactivate() override;
// End implementation of mbgl::gfx::RendererBackend
// Implementation of mbgl::gl::RendererBackend
public:
void updateAssumedState() override;
private:
mbgl::gl::ProcAddress getExtensionFunctionPointer(const char* name) override;
// End implementation of mbgl::gl::Rendererbackend
// Implementation of MLNMapViewImpl
public:
mbgl::gfx::RendererBackend& getRendererBackend() override { return *this; }
mbgl::PremultipliedImage readStillImage() override;
CGLContextObj getCGLContextObj() override;
};