https://github.com/ponup/php-opengl
PHP-OpenGL source code
https://github.com/ponup/php-opengl
opengl php
Last synced: 7 days ago
JSON representation
PHP-OpenGL source code
- Host: GitHub
- URL: https://github.com/ponup/php-opengl
- Owner: Ponup
- License: mit
- Created: 2013-12-04T20:51:27.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2023-01-01T17:07:26.000Z (over 2 years ago)
- Last Synced: 2025-03-31T01:51:21.380Z (about 1 month ago)
- Topics: opengl, php
- Language: C
- Homepage: http://pecl.php.net/package/opengl
- Size: 8.89 MB
- Stars: 110
- Watchers: 21
- Forks: 17
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/Ponup/php-opengl/actions/workflows/build-test.yml)
# PHP-OpenGL
PHP bindings of the OpenGL library. This library allows you to create inmersive 3D applications and games for the desktop with the comfort of the PHP language.
The extension only supports modern OpenGL and the core profile. The OpenGL compatibility profile (which provides functions such as glRotate, glBegin, glLight, etc...) is not supported.
[
](opengl-camera-demo.gif)
## Requirements
- PHP8.1
- [SDL extension for PHP](https://github.com/Ponup/php-sdl)
- OpenGL library/framework
- Linux/MacOS (Windows support coming soon)
- The PHP GD extension is required to run some of the examples.## Installation
### Linux
```bash
pecl install opengl-devel
```Or
```bash
git clone [email protected]:Ponup/php-opengl.git --recursive phpopengl
cd php-opengl
phpize
./configure --with-opengl
make
sudo make install
```## Examples
```php
type == SDL_KEYDOWN) break;
SDL_Delay(50);
}SDL_DestroyWindow($window);
```Complete examples can be found in the [examples](examples) folder.