Skip to content

Simple lighting

This example shows how to render a 3D object with simple lighting using PHP OpenGL.

Basic lighting with OpenGL in PHP

Basic lighting with OpenGL in PHP

Run this example:

php examples/06_basic_light.php
--------------------------------------------------------------------------------
-> Use the mouse to rotate the object
-> Press ESC to close the window
-> Press W to toggle wireframe mode
--------------------------------------------------------------------------------