Download the PHP package php-io-extensions/glfw without Composer

On this page you can find all versions of the php package php-io-extensions/glfw. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package glfw

php-glfw

PHP GLFW Built with Zephir

PHP extension for GLFW 3.4 — built with Zephir, installable via PHP PIE.

glfw exposes GLFW's init, window, monitor, input, context, and Vulkan APIs to PHP 8.2+ as namespaced static classes under Glfw\GLFW\…. Methods mirror the C API 1:1 and return values with the same semantics (opaque handles as int, structs as arrays, PHP callables for GLFW callbacks).

This extension is the binding layer used by ScrapyardIO's Windowed Visual Output stack (alongside php-io-extensions/sdl3). GLFW #define constants live in a companion microscrap wrapper package, not in this extension.


Requirements

Component Minimum version Notes
PHP 8.2 ZTS and NTS builds both supported.
GLFW 3.4.0 Must be discoverable via pkg-config glfw3 or the usual search paths.
OS Linux / macOS x86_64 + aarch64 Linux, Darwin. Windows is not currently supported.
Compiler C11 toolchain gcc, clang, or Apple Clang.
php-dev / phpize matches PHP Required for any build path that is not PIE.

Installation

Via PHP PIE (recommended)

Platform installers

macOS (Homebrew):

Debian Trixie / Raspberry Pi OS (amd64, arm64):

JetPack 6 / Ubuntu 22.04:

Manual build with Zephir (maintainers)

scripts/prepare-ext.sh is what you run before committing / tagging for Packagist. It rewrites ext/config.m4 to the portable form (pkg-config + OS OpenGL link) and strips Makefile / configure / modules/ / *.lo so absolute host paths never ship.

Zephir 0.19 truncates ZEPHIR_REGISTER_CLASS names for glfw/glfw/... paths — the prepare script applies that fix automatically.


Quick start

Examples


API surface

Class Namespace Coverage
GLFW Glfw\GLFW init, terminate, version, platform, error callback
GLFWError Glfw\GLFW glfwGetError["code","description"]
GLFWMonitor Glfw\GLFW\Monitor monitors, video modes, gamma, monitor callback
GLFWWindow Glfw\GLFW\Window windows, attributes, event loop, window callbacks
GLFWInput Glfw\GLFW\Input keyboard/mouse/cursor/joystick/gamepad/clipboard/time
GLFWContext Glfw\GLFW\Context OpenGL context + swap
GLFWVulkan Glfw\GLFW\Vulkan Vulkan helpers

All 124 GLFWAPI functions from GLFW 3.4 are bound.

Binding conventions


Version

0.7.1 — ecosystem docs line 0.7.x. IDE stubs under ide/0.7.1/. Input scalars: glfwGetCursorX / glfwGetCursorY / glfwGetGamepadButton / glfwGetGamepadAxis.

Published companion docs (human narrative) live on the ScrapyardIO ecosystem site for php-io-extensions / glfw when synced — prefer this repo’s .okf/ for agent-facing package knowledge.

License

MIT — see LICENSE.


All versions of glfw with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package php-io-extensions/glfw contains the following files

Loading the files please wait ...