PHP code example of microscrap / open-gl

1. Go to this page and download the library: Download microscrap/open-gl library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

microscrap / open-gl example snippets


use Microscrap\Bindings\OpenGL\Enums\ClearBufferMask;
use Microscrap\Bindings\OpenGL\Enums\StringName;

glClearColor(0.1, 0.1, 0.12, 1.0);
glClear(ClearBufferMask::GL_COLOR_BUFFER_BIT);
echo glGetString(StringName::GL_VERSION);

use Microscrap\Bindings\OpenGL\GL;
use Microscrap\Bindings\OpenGL\Enums\ClearBufferMask;
use Microscrap\Bindings\OpenGL\Enums\StringName;

GL::clearColor(0.1, 0.1, 0.12, 1.0);
GL::clear(ClearBufferMask::GL_COLOR_BUFFER_BIT);
echo GL::getString(StringName::GL_VERSION);