Skip to content

Text Rendering

This example shows how to render text using PHP OpenGL. It uses a simple bitmap font to render text on the screen.

Note

This example shows how to implement text rendering with OpenGL from scratch. In most cases you want to use the VectorGraphics API to render text. See the VectorGraphics Text Rendering.

Text rendering with OpenGL in PHP

Text rendering with OpenGL in PHP

Run this example:

php examples/07_text_rendering.php