Skip to content

WebSMD/opengl-headers

Repository files navigation

Latest Stable Version Latest Unstable Version Total Downloads License MIT

OpenGL Headers

This is a C headers of the OpenGL adopted for PHP.

Requirements

  • PHP >= 8.1

Installation

Library is available as composer repository and can be installed using the following command in a root of your project.

$ composer require ffi-headers/opengl-headers

Usage

use FFI\Headers\OpenGL;
use FFI\Headers\OpenGL\Extension;

$gl = OpenGL::create(
    coreProfile: false,                 // Core Profile vs Compat
    platform: OpenGL\Platform::GLX,     // GLX (Unix/Linux) or WGL (Windows) 
    extensions: [                       // List of additional extensions
        Extension::GL_EXT_TEXTURE_COMPRESSION_DXT1,
    ],
);

echo $gl;

About

PHP FFI OpenGL Headers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published