Download the PHP package mario-deluna/php-glfw without Composer

On this page you can find all versions of the php package mario-deluna/php-glfw. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-glfw

PHP-GLFW

LICENSE GitHub tag issues - php-glfw

PHP-GLFW Tests MacOS Installer Windows Build

Website β€’ Getting Started β€’ API Docs β€’ Examples

A fully-featured OpenGL and GLFW extension for PHP. Batteries included πŸ”‹!

PHP-GLFW allows you to create 2D and 3D real-time applications in PHP. It introduces a whole new set of tools for PHP developers to build graphical applications like games, scientific simulations, user interfaces, and much more.

3D Rendering in PHP

Currently supports PHP8.x

What is this extension? Features πŸš€

PHP-GLFW aims to be a complete solution containing everything you need to start building graphical applications in PHP. It doesn't just provide GLFW library bindings, but also includes OpenGL bindings and a set of essential classes and helpers.

OpenGL

GLFW

This extension includes bindings for the powerful GLFW library, offering a range of amazing features, such as:

Vector Graphics API

PHP-GLFW includes a vector graphics API that allows you to draw in a HTML canvas-like manner in PHP. Its uses the same OpenGL context internally allowing you to build complex rendering pipelines utilizing both the vector graphics API and the more low-level OpenGL API.

PHP Vector Graphics Rendering Library

  1. Read more about the Vector Graphics API

PHPGL - Math

PHP-GLFW comes with a built-in mathematics library, written in C and optimized for graphical applications.

PHP Vector Math Library

Integration into the extension offers several advantages:

  1. Read more about math functions

PHPGL - Buffers

This extension also includes a set of buffer objects that internally hold data in native types.

  1. Read more about the buffers

PHPGL - Textures

PHP-GLFW supports the loading of images/textures into buffers without requiring an additional extension:

  1. Read more about texture loading

PHPGL - Geometry

PHP-GLFW comes with a .obj wavefront file loader, allowing you to load and parse .obj files. It also provides helpers to generate tangent and bitangent vectors for the loaded geometry. Currently, only triangulated geometry is supported, with no support for quads.

  1. Read more about geometry loading

How are the bindings achieved?

PHP-GLFW parses the OpenGL specs to generate most of the C extension, instead of porting functions manually. Manual adjustments are made where necessary.

Documentation πŸ“š

  1. Full Documentation
  2. Getting Started Guide
  3. User Guide
  4. API Docs

Examples

Explore the examples directory to dive into the code.

FlappyPHPant

A very simple Flappy Bird-like game written in PHP.

FlappyPHPant 2D PHP Game

https://github.com/phpgl/flappyphpant

php-chip8

Yet another CHIP-8 emulator, but in PHP!

A CHIP-8 Game Emulator written in PHP

https://github.com/mario-deluna/php-chip8

PHP-Towerdense Game

We are currently developing a 3D game entirely built with PHP, leveraging the power of PHP-GLFW. The game, named PHP-TowerDefense, is open-source and serves as a showcase for the capabilities of PHP-GLFW. Although the game is in active development, it is not yet ready for release.

PHP-TowerDefense Screenshot

Check out the game's repository on GitHub for more information and to follow its progress: https://github.com/phpgl/php-towerdefense

php-pong

Classic Pong game programmed with pure OpenGL wrapped in OOP code.

Classic Pong Game written in PHP

https://github.com/medilies/php-pong

Installation

Please refer to the comprehensive installation guide here: Installation

PHP Version: >= 8.0 While I would love to support older PHP builds, it was just not feasible for this extension.

MacOS

Installer

You can use a simple installer script to install PHP-GLFW:

Once you see "Installation finished!", you're ready to go!

Manual installation

For a manual approach, ensure you have installed the php-dev, git, and cmake packages. They are required!

Don't forget to add glfw.so in the php.ini file:

Linux

cmake is required for the installation. You can skip the first step if it's already installed. Also, make sure that you install the php-dev package, for example, php8.1-dev.

Make sure to add glfw.so in the php.ini file:

Stubs (IDE Support)

As this is a PHP extension, your editor / IDE does not support auto-completion and doc lookups without some help. We created a composer package you can include as a dev dependency to have full support:

Credits

License

Please see License File for more information.


All versions of php-glfw with dependencies

PHP Build Version
Package Version
Requires php Version >= 8.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package mario-deluna/php-glfw contains the following files

Loading the files please wait ....