Skip to content

Textued 3D Cube

This example shows how to render a textured cube using PHP OpenGL. It provides an example of how to load a texture from a file and how to use it in a shader using the PHP-GLFW GL\Texture\Texture2D class.

A textued 3D Cube drawn with OpenGL in PHP

A textued 3D Cube drawn with OpenGL in PHP

Run this example:

php examples/03_textured_cube.php