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

macOS (Cocoa/Metal) implementation of CreateWgpuSurfaceFromGlfwWindow. More...

#include "donner/editor/gui/EditorWgpuSurface.h"
import <Cocoa/Cocoa.h>
import <QuartzCore/CAMetalLayer.h>
#include "GLFW/glfw3.h"
#include "GLFW/glfw3native.h"
Include dependency graph for EditorWgpuSurface_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::editor::gui::CreateWgpuSurfaceFromGlfwWindow (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 CreateWgpuSurfaceFromGlfwWindow.

Function Documentation

◆ CreateWgpuSurfaceFromGlfwWindow()

wgpu::Surface donner::editor::gui::CreateWgpuSurfaceFromGlfwWindow ( 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.