Files
MapLibreParticleLab/platform/glfw/glfw_metal_backend.mm
Bart Louwers e4a4b9ec67 macOS Metal + AppKit app (#2205)
Co-authored-by: mwilsnd <mwilsnd@gmail.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2024-04-02 01:52:19 +02:00

27 lines
602 B
Plaintext

#include "glfw_metal_backend.h"
#include "metal_backend.h"
#define GLFW_EXPOSE_NATIVE_COCOA
#include <GLFW/glfw3.h>
#include <GLFW/glfw3native.h>
GLFWMetalBackend::GLFWMetalBackend(GLFWwindow* window_, const bool capFrameRate)
:
window(glfwGetCocoaWindow(window_)),
rendererBackend(window)
{
}
mbgl::gfx::RendererBackend& GLFWMetalBackend::getRendererBackend() {
return rendererBackend;
}
void GLFWMetalBackend::setSize(mbgl::Size size) {
rendererBackend.setSize(size);
}
mbgl::Size GLFWMetalBackend::getSize() const {
return rendererBackend.getSize();
}