|
|
Donner 0.5.1
Embeddable browser-grade SVG2 engine
|
macOS (Cocoa/Metal) implementation of CreateSurfaceFromGlfwWindow. More...
#include "examples/geode_embed_surface.h"import <Cocoa/Cocoa.h>import <QuartzCore/CAMetalLayer.h>#include "GLFW/glfw3.h"#include "GLFW/glfw3native.h"Namespaces | |
| namespace | donner |
| Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css. | |
macOS (Cocoa/Metal) implementation of CreateSurfaceFromGlfwWindow.
wgpu-native's Metal backend expects a CAMetalLayer, not an NSWindow. GLFW gives us an NSWindow* via glfwGetCocoaWindow; we install a CAMetalLayer on its content view if one isn't already there, then hand the layer pointer to webgpu via SurfaceSourceMetalLayer.