Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
geode_embed_surface_macos.mm File Reference

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"
Include dependency graph for geode_embed_surface_macos.mm:

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Functions

wgpu::Surface donner::example::CreateSurfaceFromGlfwWindow (const wgpu::Instance &instance, GLFWwindow *window)
 Create a WebGPU surface backed by the platform-native handle of window.

Detailed Description

macOS (Cocoa/Metal) implementation of CreateSurfaceFromGlfwWindow.

Function Documentation

◆ CreateSurfaceFromGlfwWindow()

wgpu::Surface donner::example::CreateSurfaceFromGlfwWindow ( const wgpu::Instance & instance,
GLFWwindow * window )
nodiscard

Create a WebGPU surface backed by the platform-native handle of window.

Parameters
instanceWebGPU instance used to create the surface.
windowGLFW window that owns the native platform window.
Returns
A valid surface, or an invalid surface when native handle extraction fails.