C++ ports of the official Microsoft XNA Game Studio 4.0 sample collection, running on CNA — a C++ reimplementation of the XNA 4.0 programming model built on SDL3.
| Tool | Version |
|---|---|
| CMake | ≥ 3.20 |
| C++ compiler | C++23 (GCC 13+, Clang 16+, MSVC 19.38+) |
| CNA | sibling directory ../cna |
| sharp-runtime | sibling directory ../sharp-runtime |
Clone all three side-by-side:
openeggbert/
├── cna/
├── sharp-runtime/
└── cna-samples/ ← this repo
cmake -B build -DCMAKE_BUILD_TYPE=Debug -DCNA_SAMPLES_ONLY=PrimitivesSample
cmake --build build --target PrimitivesSample_cna_samplesRun a sample:
./build/samples/PrimitivesSample/PrimitivesSample_cna_samplesFor a statically hostable WebGL 2 bundle, configure with Emscripten and Release mode. Browser
threads are disabled by default; pass -DCNA_SAMPLES_ENABLE_EMSCRIPTEN_THREADS=ON only for a
sample that genuinely uses System.Threading and will be served with COOP/COEP headers.
See plan.md for the full inventory and migration roadmap.
Microsoft Permissive License (Ms-PL) — see LICENSE. Derived from the XNA Game Studio 4.0 sample collection © Microsoft Corporation.