jovian / venusian-glfw
The 'glfw' stager for Venusian topside: staged windows on GLFW 3.4 through ext-glfw, on macOS and Linux.
Requires
- php: ~8.4.27||^8.5.12
- ext-glfw: ^0.11.0
- ext-opengl: ^0.11.0
- venusian-surface/bridge: ^0.11.0
- venusian-surface/contracts: ^0.11.0
- venusian-surface/drawing: ^0.11.0
- venusian-surface/windows: ^0.11.0
- venusian-voyager/nuts-and-bolts: ^0.11.0
Requires (Dev)
- jovian/venusian-vulkan: ^0.11.0
- pestphp/pest: ^4
- venusian-voyager/vessel: ^0.11.0
Suggests
- ext-appkit: Required on macOS (the session refuses to connect without it): a press's click count and a scroll's precision come from the current NSEvent; also the CGL handle of a lent GL context, the Metal layer, the safe area.
- ext-metal: On macOS with ext-appkit: lending a CAMetalLayer.
- ext-vulkan: Lending a VkSurfaceKHR.
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-12-03 14:56:36 UTC
README
The glfw stager for Venusian topside: staged windows on GLFW 3.4 through ext-glfw, on macOS and Linux.
Requirements
- PHP 8.4, ext-glfw ^0.11.1 and GLFW 3.4. Ubuntu 24.04 ships GLFW 3.3.10 and needs a GLFW 3.4 of its own on the pkg-config path.
- ext-opengl for the
openglkind of surface, ext-vulkan for thevulkankind. Each is suggested, not required; a kind checks for its own extension when it is picked.
Install
composer require jovian/venusian-glfw
The provider is discovered through extra.venusian.providers and merges config/glfw.php.
Configuration
'surface' => env('GLFW_SURFACE', 'opengl'),
The kind of surface a window is made with, fixed when the window is created: opengl, vulkan or native. Publish the file with the glfw-config tag.
Usage
With WINDOW_DRIVER=glfw, topside's Windows opens GLFW windows:
use Surface\Windows\Windows; $window = Windows::open('Orrery', 1024, 768)->show(); $window->setShown($list); // a draw list, drawn by the configured engine
A window opens hidden until show(). The opengl kind uses OpenGL 3.2 core on macOS and OpenGL ES 3.0 through EGL on Linux, and shows premultiplied BGRA or RGBA frames. The vulkan kind shows premultiplied BGRA or RGBA frames, those the window's surface offers, on a Vulkan 1.4 device with host image copy; a window that only lends its place needs no such device, and native is refused as currently unsupported.
A window also lends the place a GPU driver draws on, through its surface(): the opengl kind its context (CGLContextObj on macOS, EGLContext on Linux), and on Linux the vulkan kind the X11 or Wayland surface create-info. A vulkan window does one of the two: it shows frames, or it lends its place.
Earlier code
The package's earlier stager is kept in deprecated/, and its tests in deprecated-tests/. Neither is autoloaded or run.
Security
See SECURITY.md.
License
MIT. See LICENSE.