Download the PHP package php-io-extensions/glfw without Composer

On this page you can find all versions of the php package php-io-extensions/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 glfw

glfw

CI

1:1 PHP bindings of GLFW 3.4 for staged windows: initialization and errors, monitors, video modes and gamma, windows with their hints, attributes and callbacks, events and time, OpenGL contexts, Vulkan surfaces, and native handles. Version 0.10.0. Linux and macOS.

Input is not bound: no keyboard, mouse, cursor, joystick or gamepad functions. Function and constant names are the C names. A handle is one PHP object per native pointer. Dropping the last PHP reference does not destroy the native object.

Requirements

No Vulkan, X11, Wayland, GLX or EGL headers are needed to build: the extension declares the few Vulkan types and native-access functions it uses with ABI-identical types.

Install

Through PIE:

From a checkout:

The macOS installer ad-hoc signs the .so and writes 30-glfw.ini, unless an ini in that PHP's scan directory already loads glfw. Pass other PHP binaries as arguments to install those instead.

Names

Bindings are the C API with these translations:

Failure is glfwGetError() or the error callback, as in C. Constants are PHP constants under their C names, with the values of the GLFW header.

Windows for a game engine

An OpenGL window turns vsync off and on with glfwSwapInterval(0) and glfwSwapInterval(1) while its context is current.

Vulkan

Instances, physical devices and surfaces are their handle values as ints, so ext-vulkan's handles pass through pointer() and fromPointer():

GLFW finds the Vulkan loader on the dynamic linker's path. Homebrew's loader on macOS is not on it; hand GLFW its vkGetInstanceProcAddr before glfwInit() with glfwInitVulkanLoader($address).

Native handles

glfwGetCocoaWindow, glfwGetCocoaView, glfwGetCocoaMonitor and glfwGetNSGLContext on macOS; glfwGetX11*, glfwGetWayland*, glfwGetGLX* and glfwGetEGL* on Linux. Each answers an address or an id, for another extension to adopt (NSWindow::fromPointer(glfwGetCocoaWindow($window))).

Platform differences

GLFW's own, reported through glfwGetError():

Tests

On a Linux desktop session over SSH, export WAYLAND_DISPLAY, DISPLAY and XDG_RUNTIME_DIR first.

License

MIT


All versions of glfw with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
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 php-io-extensions/glfw contains the following files

Loading the files please wait ...