Skip to content

About the examples

In this section you will find a collection of examples that demonstrate how to use PHP-GLFW. The examples are organized in a way that you can follow the progression of the examples and learn more about the library.

OpenSource Projects

  • PHP CHIP-8


    PHP CHIP-8, a chip8 emulator written in PHP

  • Flappyphant


    Flppyphant, a 2D game written in PHP

Basic examples

  • 1. Basic triangle


    Example

  • 2. Basic cube


    Example

  • 3. Textured cube


    Example

  • 4. Instancing


    Example

  • 5. Obj file loader


    Example

  • 6. Simple lighting


    Example

  • 7. Text rendering


    Example

  • 8. Input & Events


    Example

Vector Graphics examples

Color

  • Color Constants


    Example

  • Color Lightness


    Example

Fun

  • Visaulizing Bitshifting


    Example

  • Plotting primes


    Example

  • Genetic Car Pathfinding


    Example

Gradients

  • Linear Gradient


    Example

  • Radial Gradient


    Example

  • Gradient Wave


    Example

Images

  • Image Filtering


    Example

  • Image Repetition


    Example

  • Image Rotation


    Example

Input

  • Joystick Input


    Example

Noise

  • Noise explorer


    Example

  • Noise Grid


    Example

Text

  • Text Alignment


    Example

  • Text Boxes


    Example

  • Colored Words


    Example

  • Text with Shadow


    Example

Advanced examples

  • 10. Sponza Scene


    Example