PHPackages                             php-io-extensions/open-gl - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. php-io-extensions/open-gl

ActivePhp-ext

php-io-extensions/open-gl
=========================

PHP-Controllable OpenGL Rendering Extension

0.7.x-dev(today)02↑2900%MITCPHP &gt;=8.2

Since Aug 9Pushed todayCompare

[ Source](https://github.com/php-io-extensions/open-gl)[ Packagist](https://packagist.org/packages/php-io-extensions/open-gl)[ RSS](/packages/php-io-extensions-open-gl/feed)WikiDiscussions 0.7.x Synced today

READMEChangelogDependenciesVersions (2)Used By (0)

php-open-gl
===========

[](#php-open-gl)

[![PHP](https://camo.githubusercontent.com/c43902a50e55ff766fc179e27d9b9a292ef8fcadbdd4d855bb077a334e2f9b46/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d254532253839254135253230382e322d3737376262343f6c6f676f3d706870266c6f676f436f6c6f723d7768697465)](https://www.php.net)[![Built with Zephir](https://camo.githubusercontent.com/8e72a9e9874ec036e66f84af12bd028857d1f200674b7acaa9eb97271a123f7c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c74253230776974682d5a65706869722d666636613030)](https://zephir-lang.com/)[![Platform](https://camo.githubusercontent.com/37c663164df6eec24d0327668403be1782ab3245cf57963be37d9b6873a823a8/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d2d6c696e75782532302537432532306d61634f532d6c6967687467726579)](#requirements)[![License: MIT](https://camo.githubusercontent.com/f8df3091bbe1149f398a5369b2c39e896766f9f6efba3477c63e9b4aa940ef14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e)](#license)

> PHP extension for the OpenGL **rendering API** — built with [Zephir](https://zephir-lang.com/), installable via [PHP PIE](https://github.com/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
------------

[](#requirements)

ComponentMinimum versionNotesPHP8.2ZTS and NTS builds both supported.OpenGLsystemmacOS `OpenGL.framework` or Linux Mesa (`libgl1-mesa-dev`).OSLinux / macOSx86\_64 + aarch64. Windows is not currently supported.CompilerC11 toolchain`gcc`, `clang`, or Apple Clang.`php-dev` / `phpize`matches PHPRequired for any build path that is not PIE.---

Installation
------------

[](#installation)

### Via PHP PIE (recommended)

[](#via-php-pie-recommended)

```
pie install php-io-extensions/open-gl
```

### Platform installers

[](#platform-installers)

**macOS** (Homebrew / system frameworks):

```
bash install-macos.sh
# or with Laravel Herd on PATH:
bash install-macos-herd.sh
```

**Debian Trixie / Raspberry Pi OS**:

```
bash install-debian-trixie.sh
```

**JetPack 6 / Ubuntu 22.04** (Jetson):

```
bash install-jetpack6.sh
```

### Manual build with Zephir (maintainers)

[](#manual-build-with-zephir-maintainers)

```
bash scripts/prepare-ext.sh
cd ext && phpize && ./configure --enable-opengl && make
php -n -d extension="$(pwd)/modules/opengl.so" --ri opengl
```

`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
-----------

[](#quick-start)

```
