{"id":22873760,"url":"https://github.com/ponup/php-opengl","last_synced_at":"2025-05-06T18:58:33.393Z","repository":{"id":70708305,"uuid":"14935476","full_name":"Ponup/php-opengl","owner":"Ponup","description":"PHP-OpenGL source code","archived":false,"fork":false,"pushed_at":"2023-01-01T17:07:26.000Z","size":9324,"stargazers_count":110,"open_issues_count":6,"forks_count":17,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-03-31T01:51:21.380Z","etag":null,"topics":["opengl","php"],"latest_commit_sha":null,"homepage":"http://pecl.php.net/package/opengl","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ponup.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-12-04T20:51:27.000Z","updated_at":"2025-02-14T22:12:43.000Z","dependencies_parsed_at":"2023-08-31T12:17:03.032Z","dependency_job_id":null,"html_url":"https://github.com/Ponup/php-opengl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ponup%2Fphp-opengl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ponup%2Fphp-opengl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ponup%2Fphp-opengl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ponup%2Fphp-opengl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ponup","download_url":"https://codeload.github.com/Ponup/php-opengl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252751855,"owners_count":21798695,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["opengl","php"],"created_at":"2024-12-13T14:30:12.700Z","updated_at":"2025-05-06T18:58:33.388Z","avatar_url":"https://github.com/Ponup.png","language":"C","readme":"[![Build and test](https://github.com/Ponup/php-opengl/actions/workflows/build-test.yml/badge.svg)](https://github.com/Ponup/php-opengl/actions/workflows/build-test.yml)\n\n# PHP-OpenGL\n\nPHP 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.\n\nThe 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.\n\n[\u003cimg src=\"opengl-camera-demo.gif\" width=\"250\" /\u003e](opengl-camera-demo.gif)\n\n## Requirements\n\n- PHP8.1\n- [SDL extension for PHP](https://github.com/Ponup/php-sdl)\n- OpenGL library/framework\n- Linux/MacOS (Windows support coming soon)\n- The PHP GD extension is required to run some of the examples.\n\n## Installation\n\n### Linux\n\n```bash\npecl install opengl-devel\n```\n\nOr\n\n```bash\ngit clone git@github.com:Ponup/php-opengl.git --recursive phpopengl\ncd php-opengl\nphpize\n./configure --with-opengl\nmake\nsudo make install\n```\n\n## Examples\n\n```php\n\u003c?php\nSDL_Init(SDL_INIT_EVERYTHING);\n\n$window = SDL_CreateWindow(\"Fixed pipeline example\", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,                \n                640, 480, SDL_WINDOW_OPENGL | SDL_WINDOW_SHOWN);                                                                                               \nSDL_GL_CreateContext($window);    \n\nglClearColor(0, 0, .2, 1); \nglClear(GL_COLOR_BUFFER_BIT);\nSDL_GL_SwapWindow($window);\n\n$event = new SDL_Event;\nwhile(true) {\n\tSDL_PollEvent($event);\n\tif($event-\u003etype == SDL_KEYDOWN) break;\n\tSDL_Delay(50);\n}\n\nSDL_DestroyWindow($window);\n```\n\nComplete examples can be found in the [examples](examples) folder.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fponup%2Fphp-opengl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fponup%2Fphp-opengl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fponup%2Fphp-opengl/lists"}