Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.26 KB

README.md

File metadata and controls

50 lines (36 loc) · 1.26 KB

PHP-SFML

SFML (Simple and Fast Multimedia Library) bindings for the php language.

Requirements

  • C compiler
  • Automake tools
  • libsfml v2 libraries and headers
  • UN*X OS (eg Linux, Macos)

Building

To compile your new extension, you will have to execute the following steps:

$ phpize
$ ./configure [--enable--sfml] 
$ make
$ make test
$ [sudo] make install

Then add

extension=sfml.so

to your php.ini file.

Documentation

The SFML extension aims to mimic almost every single aspect of the official C++ library, so until we write our own documentation, refer to the C++ counterpart.

Example

Currently the only bindings available are for the SFML version consts/defines:

echo sprintf("Using SFML v%d.%d.%d", SFML_VERSION_MAJOR, SFML_VERSION_MINOR, SFML_VERSION_PATCH) . PHP_EOL;

Developing

If you're using an IDE like PHPStorm you can add the stubs directory to your include path for auto-completion.

Support and feature requests

Please submit anything that requires our attention to our issue tracker on Github. We will attempt to respond to sensible requests in a reasonable time frame.