Contributions
Audio — GSound and GMusic
Input — GInput, GBufferedInput and GController
Math — GMatrix, GVector and GQuaternion
System — GConcurrent, GDaemon, GFile and GLog
Core — GLogic and GThreadShared
Graphics — GBlitter
Cross-platform validation on Windows, Mac and Linux
An offset bit read fix in the GMusic library
Purpose
- Small, self-contained programs showing how each Gateware interface is meant to be used. Only the code needed for that library, nothing else.
- Grouped by level: Audio, Core, Graphics, Input, Math and System. Each builds with CMake, with Gateware as a submodule.
- Two surface samples already existed. I wrote the rest, one interface at a time.
Audio, and a Bug
- GSound and GMusic need a running app to keep playing, and there was no way to ask whether a track had finished. The samples idle with sleep and yield instead.
- The audio file I picked exposed an offset bit read in GMusic. That fix went into the library, not just the sample.
- Testing on all three platforms is what caught it.
Threading Samples
- GDaemon, GThreadShared and GConcurrent taught me the most.
- My first GDaemon sample hung event responders off a daemon, which isn't what daemons are for.
- The rewrite runs Fibonacci on one daemon while a second toggles it on and off, both reporting status on an interval.
Rendering and Tooling
- GBlitter draws a slime sprite spinning over grass tiles, loaded from TGA files.
- GFile and GLogic double as groundwork for automated stress-test analysis.
- Three platforms meant a lot of CMake. Every sample ships through the same CI/CD pipeline as the rest of Gateware.
The GBlitter sample, blitting a slime sprite over TGA grass tiles.
GInput polling key states, mouse position and delta each frame.
GMusic holding the program open so a track can finish playing.
One daemon iterating Fibonacci while a second toggles it on and off.