Search by

jovian / venusian-glfw

projectsaturnstudios

The 'glfw' stager for Venusian topside: staged windows on GLFW 3.4 through ext-glfw, on macOS and Linux.

v0.11.0 2026-11-08 15:31 UTC

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 opengl kind of surface, ext-vulkan for the vulkan kind. 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.