jovian / venusian-ogx
OpenGL composition layer for Venusian Surface GPU drawing — macOS and Linux
Requires
- php: ^8.4|^8.5|^8.6
- jovian/ogx: ^0.8.0
- venusian-surface/contracts: ^0.8.0
- venusian-surface/drawing: ^0.8.0
- venusian-voyager/contracts: ^0.8.0
- venusian-voyager/nuts-and-bolts: ^0.8.0
Requires (Dev)
- pestphp/pest: ^4
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-18 17:50:24 UTC
README
OpenGL composition for Venusian Surface GPU drawing — the same engine on the
Mac (GL 4.1 core in an NSOpenGLView) and the Pi (GLES 3.1 in a GtkGLArea).
ext-opengl → jovian/ogx → venusian-ogx → Surface
1:1 typed composition cross-platform
The host window engine owns the GL context and lends it through
Surface\Contracts\Drawing\GLSurface; this package owns everything inside it.
Install
composer require jovian/venusian-ogx
Registers VenusianOpenGLServiceProvider, which binds OpenGLEngine as the
gpu.opengl singleton. Surface resolves that alias and nothing else.
The shape of it
$window->gpu('scene', 'opengl', 20, 20, 640, 560) ->onDraw(fn (Drawing2D $g, Frame $f) => $g->fillCircle(100.0, 100.0, 40.0, Color::hex('#ff8c00'))); $gpu->executor() instanceof Jovian\Venusian\OpenGL\Contracts\OpenGLDrawing; // bespoke half $gpu->executor()->program(); // non-zero after the first frame
A frame is makeCurrent → read the bound FBO → viewport/clear → draws staged
through one Bridge::alloc block → glFlush → present. Blending is on, so
Painter alpha is real here.