Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
PHP-SDL extension source code
C PHP
branch: master
Failed to load latest commit information.
examples Various improvements. More SDL API coverage (render/event partially).…
sdl_gfx Shared objects now take with them their dependencies (fixes #15)
sdl_image Shared objects now take with them their dependencies (fixes #15)
sdl_mixer Shared objects now take with them their dependencies (fixes #15)
sdl_smpeg Shared objects now take with them their dependencies (fixes #15)
sdl_ttf Shared objects now take with them their dependencies (fixes #15)
tests Some render and timer functions were added. New examples.
.gitattributes attr
.gitignore Better checking of PHP version both when the extension is statically …
CREDITS SDL_SetError(), SDL_GetError(), SDL_ClearError
EXPERIMENTAL New extension
LICENSE New extension
README describe goal in readme
README.md Update README.md
REFLECTION add class SDL_cond, see #14
TODO Filesystem functions (GetBasePath, GetPrefPath) ported to PHPSDL. (cl…
blendmode.c new sources for keyboard, see #
blendmode.h attr (2)
check.sh add package.xml checker
config.m4 Various improvements. More SDL API coverage (render/event partially).…
cpuinfo.c new sources for keyboard, see #
cpuinfo.h attr (2)
error.c new sources for keyboard, see #
error.h attr (2)
event.c Various improvements. More SDL API coverage (render/event partially).…
event.h Various improvements. More SDL API coverage (render/event partially).…
filesystem.c Filesystem functions (GetBasePath, GetPrefPath) ported to PHPSDL. (cl…
filesystem.h Filesystem functions (GetBasePath, GetPrefPath) ported to PHPSDL. (cl…
glcontext.c Conditional compiling certain SDL 2.0.1 functions and constants (ie S…
glcontext.h Conditional compiling certain SDL 2.0.1 functions and constants (ie S…
keyboard.c cleanup proto and static methods
keyboard.h new sources for keyboard, see #
messagebox.c Some render and timer functions were added. New examples.
messagebox.h read property of SDL_MessageBoxData, fix #10
mouse.c cleanup proto and static methods
mouse.h add SDL_GetMouseState(), SDL_GetRelativeMouseState(), SDL_WarpMouseIn…
mutex.c add class SDL_cond, see #14
mutex.h add class SDL_cond, see #14
package.xml Some render and timer functions were added. New examples.
php_sdl.c Various improvements. More SDL API coverage (render/event partially).…
php_sdl.h Various improvements. More SDL API coverage (render/event partially).…
pixels.c cleanup proto and static methods
pixels.h add SDL_Pixels class for memory access
platform.c cleanup proto and static methods
platform.h attr (2)
power.c cleanup proto and static methods
power.h attr (2)
rect.c cleanup proto and static methods
rect.h Some render and timer functions were added. New examples.
render.c Various improvements. More SDL API coverage (render/event partially).…
render.h Some render and timer functions were added. New examples.
rwops.c cleanup proto and static methods
rwops.h fix ZTS build
sdl.c cleanup proto and static methods
sdl.h attr (2)
shape.c move include, see #13
shape.h move include, see #13
surface.c cleanup proto and static methods
surface.h attr
timer.c Some render and timer functions were added. New examples.
timer.h Some render and timer functions were added. New examples.
version.c revert previous, don't use typehint for output only param
version.h attr (2)
video.c cleanup proto and static methods
video.h attr (2)
window.c Various improvements. More SDL API coverage (render/event partially).…
window.h add SDL_GL_MakeCurrent(), SDL_GL_GetCurrentWindow(), SDL_GL_GetCurren…

README.md

PHP-SDL

Installation

Requirements

  • C compiler
  • Automake tools
  • PHP devel
  • libSDL v1.2.* devel libraries and headers

Via PECL (recommended)

pecl install sdl-beta

Manual

Download the source code and within the main directory run these commands:

phpize

./configure --with-sdl (or --with-sdl=) make make test sudo make install

Then add

extension=sdl.so

to your php.ini file.

Installing on Windows

We are working on the Windows build. Stay tuned.

Documentation

The SDL extension mimics in almost every single aspect to the official C library, so until we write our own documentation, refer to the C counterpart.

Support / Feedback / Bugs / Feature Requests

Please submit anything that needs our attention to issues section on Github. We are commited to attend any request in a short timespan if it's a sensible matter.

Something went wrong with that request. Please try again.