
The 7-year old full samples pack, that includes OpenGL 2, 3, 4 and Vulkan demos, is become a real mess, many demos simply no longer work. So it’s time to tidy up this pack. I decided to split demos in several smaller packs according to the 3D API: a pack for OpenGL 2.1 demos, a pack for OpenGL 3.2 demos, a pack for Vulkan demos, etc.
All demos in the OpenGL 2.1 demopack have been tested with latest GeeXLab 0.29.1. They should run on any OpenGL 2.1 capable system:
- Windows
- Linux
- macOS
- Raspberry Pi
Most of the demos are coded in Lua and each demo is split in several source codes:
- main.xml: the demo entry point. Just drag and drop this file into GeeXLab to run the demo.
- init.lua: referenced by main.xml. The demo INIT script.
- frame.lua: referenced by main.xml. The demo FRAME script.
Some demos have also other files like size.lua, terminate.lua or dnd.lua.
This new organization makes the discovering and tweaking of a demo simpler. Moreover, the live coding can be easily enabled or disabled. If you want to live-code a demo, just search for the livecoding XML attribute in the main.xml file (in the FRAME script XML node). To enable or disable live coding, just set livecoding to 1 or 0:
<script name="update_scene" run_mode="FRAME" filename="frame.lua" livecoding="1" />
With live coding, you can run a demo and edit the FRAME script at the same time in your favorite text editor. In my case, I use VSCodium on Windows, macOS and Linux and Geany on Raspberry Pi and TinkerBoard.

This first version of the GL 2.1 demopack includes 41 demos:
d01-triangle d02-libfont d03-bouncing-boxes-2d d04-audio-fmod d05-magickview d06-3d-template d07-meshes d08-color-blending d09-vertexpool d10-reflection d11-gears d12-flow-fields d13-drawing-letters-with-mouse d14-countdown d15-checkerboard d16-electrical-arc d17-fire-shader d18-hashcodes d19-loops d20-lua-filesystem d21-lua-python-shared-variables d22-multiple-viewports d23-rotation-with-quaternion d24-line d25-input d26-bullet3-physics d27-two-sided-lighthing d28-texture d29-imgui d30-video-player-ffmpeg d31-webcam d32-hello-framework d33-fisheye-shader d34-surface-plots d35-shaderlib-normal-mapping d36-slide-show d37-sqlite3 d38-cell-shading d39-2d-wave d40-2d-grid-shader d41-imgui-lot-of-windows-gl-vs-vk
Here are some screenshots:
d09-vertexpool:
d05-magickview:
d07-meshes:
d33-fisheye-shader:
d38-cell-shading:
d10-reflection:
d03-bouncing-boxes-2d:
d26-bullet3-physics:
d11-gears: