- Notifications
You must be signed in to change notification settings - Fork24
SDL2 bindings for the PHP language
License
Ponup/php-sdl
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
SDL (Simple DirectMedia Layer) bindings for the PHP language. The extension allows you to create multimedia desktop applications with windows, input handling, events, and more.
- C compiler
- Automake tools
- PHP8.1 devel
- libSDL2 devel libraries and headers
- UN*X OS (eg Linux, Macos)
pecl install sdl-beta
Then add
extension=sdl.so
to yourphp.ini file.
If you have no idea about your ini file position you can run
php -i | grep ini
and see the list of you ini files.
The SDL extension mimics in almost every single aspect to the official C library, so until we write our own documentation, refer to theC counterpart.
Standard SDL2 API is available in procedural style:
$window =SDL_CreateWindow("Foo window",500,50,350,300,SDL_WINDOW_SHOWN+SDL_WINDOW_RESIZABLE);SDL_SetWindowTitle($window,"Some new title");SDL_DestroyWindow($window);
Complete examples can be found in theexamples folder.
To compile your new extension, you will have to execute the following steps:
phpize./configure [--with--sdl] makemaketestsudo make install
About
SDL2 bindings for the PHP language
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.