microscrap/glfw-gfx

GLFW-native Rendering Package for the ScrapyardIO Framework

Maintainers

Package info

github.com/microscrap/glfw-gfx

Homepage

pkg:composer/microscrap/glfw-gfx

Transparency log

Statistics

Installs: 3

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

0.6.1 2026-07-28 20:28 UTC

This package is not auto-updated.

Last update: 2026-07-28 20:29:03 UTC


README

Latest Version on Packagist License

GLFW-native rendering for the ScrapyardIO Framework.

This package registers the glfw-ogl framebuffer strategy and the glfw GFX render driver so Fabricate can draw through a GLFW OpenGL context.

It is the rendering half of the GLFW desktop stack. For an actual windowed display panel, install dept-of-scrapyard-robotics/glfw-display.

Requirements

Installation

Confirm the extension is loaded:

php -m | grep glfw

Via Composer

composer require microscrap/glfw-gfx

Package discovery registers Microscrap\GFX\GLFW\Providers\GLFWGfxServiceProvider automatically.

Via Workshop (recommended in a Scrapyard app)

From a ScrapyardIO application:

workshop install:gfx --glfw

Or interactively:

workshop install:gfx

That installs this package (and optional siblings), then can activate GLFW as the default rendering backend.

What it registers

Registry key Role
Framebuffer glfw-ogl GLFWOpenGLFramebuffer
Renderer glfw GLFWRenderDriver

Typical config/gfx.php after activation:

return [
    'rendering' => [
        'default' => 'glfw',
        'engines' => [
            'glfw' => [],
            // ...
        ],
    ],
];

Pair with a windowed display

This package alone does not open a desktop window. Once GFX is installed, Workshop exposes:

workshop install:glfw-display

That command is hidden when dept-of-scrapyard-robotics/glfw-display is already required. When visible, it:

  1. composer require dept-of-scrapyard-robotics/glfw-display:^0.6.0
  2. Runs workshop config:glfw-display to add a default windowed.glfw entry

Options:

workshop install:glfw-display
workshop install:glfw-display --force
workshop install:glfw-display --composer=/path/to/composer

Manual wiring (without install:gfx)

composer require microscrap/glfw-gfx
php workshop package:discover

Then set config/gfx.php rendering.default to glfw (or keep another default and select glfw / glfw-ogl per display).

Stack overview

ext-glfw
  └── microscrap/glfw          (bindings)
        └── microscrap/glfw-gfx          (framebuffer + renderer)  ← this package
              └── dept-of-scrapyard-robotics/glfw-display  (windowed panel)

License

MIT