Download the PHP package php-io-extensions/open-gl without Composer
On this page you can find all versions of the php package php-io-extensions/open-gl. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download php-io-extensions/open-gl
More information about php-io-extensions/open-gl
Files in php-io-extensions/open-gl
Package open-gl
Short Description PHP-Controllable OpenGL Rendering Extension
License MIT
Informations about the package open-gl
php-open-gl
PHP extension for the OpenGL rendering API — built with Zephir, installable via PHP PIE.
opengl exposes gl* entry points to PHP 8.2+ under Opengl\GL\…. It is the
draw half of ScrapyardIO's Windowed Visual Output stack. Window/context creation
stays in peer packages (php-io-extensions/glfw, php-io-extensions/sdl3).
OpenGL #define tokens live in a companion microscrap wrapper, not in this
extension.
Requirements
| Component | Minimum version | Notes |
|---|---|---|
| PHP | 8.2 | ZTS and NTS builds both supported. |
| OpenGL | system | macOS OpenGL.framework or Linux Mesa (libgl1-mesa-dev). |
| OS | Linux / macOS | x86_64 + aarch64. 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 / system frameworks):
Debian Trixie / Raspberry Pi OS:
JetPack 6 / Ubuntu 22.04 (Jetson):
Manual build with Zephir (maintainers)
scripts/prepare-ext.sh regenerates C sources, patches portable ext/config.m4
(Darwin -framework OpenGL / Linux -lGL), applies Zephir 0.19 REGISTER fixups
when needed, and strips phpize junk so absolute host paths never ship.
Quick start
Named objects (fd)
Buffers, textures, shaders, and programs are Zephir objects. The opaque GLuint
name is stored on public fd (0 = none), matching the posi/ftdi handle style:
Examples
API surface
| Class | Namespace | Role |
|---|---|---|
GL |
Opengl\GL |
Static gl* passthrough (clear, viewport, fixed-function draw, buffer/texture/shader/program helpers) |
GlBuffer |
Opengl\GL |
Buffer object DTO (fd, target, size, usage) |
GlTexture |
Opengl\GL |
Texture object DTO (fd, target, width, height, format) |
GlShader |
Opengl\GL |
Shader object DTO (fd, type, compiled) |
GlProgram |
Opengl\GL |
Program object DTO (fd, linked) |
Binding conventions
- Opaque GLuint names → object
fd(int) or plainintwhere noted - Static methods mirror C names (
glClear,glGenBuffer, …) - Hard failures from context-less calls surface as OpenGL errors via
glGetError - No FFI
What this package is not
- Not a windowing library (use
glfw/sdl3) - Not an extension loader (GLEW/glad — future slice)
- Not Metal / Vulkan / CUDA
Version
0.7.0 — ecosystem docs line 0.7.x. IDE stubs under ide/0.7.0/.
License
MIT — see LICENSE.