-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocumentation.html
More file actions
352 lines (307 loc) · 18.4 KB
/
Copy pathdocumentation.html
File metadata and controls
352 lines (307 loc) · 18.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Documentation - CNA</title>
<meta name="description" content="CNA documentation - getting started, building, platform support, renderers, XNA compatibility, roadmap, and FAQ.">
<meta property="og:type" content="website">
<meta property="og:site_name" content="CNA">
<meta property="og:url" content="https://libcna.com/documentation.html">
<meta property="og:title" content="Documentation - CNA">
<meta property="og:description" content="CNA documentation - getting started, building, platform support, renderers, XNA compatibility, roadmap, and FAQ.">
<link rel="stylesheet" href="css/style.css">
<link rel="icon" href="favicon.svg" type="image/svg+xml">
<link rel="canonical" href="https://libcna.com/documentation.html">
<link rel="stylesheet" href="css/prism-tomorrow.min.css">
<script>(function(){try{var t=localStorage.getItem("cna-theme");if(t==="light"||t==="dark")document.documentElement.setAttribute("data-theme",t);}catch(e){}})();</script>
</head>
<body>
<a class="skip-link" href="#main-content">Skip to content</a>
<nav class="nav">
<div class="nav-container">
<a href="index.html" class="nav-brand">CNA</a>
<button class="nav-toggle" aria-label="Toggle navigation" aria-expanded="false">
<span></span><span></span><span></span>
</button>
<div class="nav-menu">
<a href="index.html" class="nav-link">Home</a>
<a href="about.html" class="nav-link">About</a>
<a href="features.html" class="nav-link">Features</a>
<a href="architecture.html" class="nav-link">Architecture</a>
<a href="documentation.html" class="nav-link">Documentation</a>
<a href="tutorials.html" class="nav-link">Tutorials</a>
<a href="demos.html" class="nav-link">Demos</a>
<a href="showcase.html" class="nav-link">Showcase</a>
<a href="videos.html" class="nav-link">Videos</a>
<a href="roadmap.html" class="nav-link">Roadmap</a>
<a href="contact.html" class="nav-link">Contact</a>
<a href="search.html" class="nav-link">Search</a>
<a href="https://github.com/openeggbert/cna" class="nav-link nav-link--github" target="_blank" rel="noopener">GitHub</a>
<a href="https://discord.gg/vrnc4n6DaE" class="nav-link nav-link--discord" target="_blank" rel="noopener">Discord</a>
</div>
<button class="theme-toggle" type="button" aria-label="Switch to light theme" title="Switch to light theme">
<svg class="theme-icon-light" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M12 17a5 5 0 1 1 0-10 5 5 0 0 1 0 10zm0-2a3 3 0 1 0 0-6 3 3 0 0 0 0 6zM11 1h2v3h-2V1zm0 19h2v3h-2v-3zM3.5 4.9l1.4-1.4 2.1 2.1-1.4 1.4L3.5 4.9zm13.5 13.5l1.4-1.4 2.1 2.1-1.4 1.4-2.1-2.1zM19.1 3.5l1.4 1.4-2.1 2.1-1.4-1.4 2.1-2.1zM5.6 17l1.4 1.4-2.1 2.1-1.4-1.4L5.6 17zM23 11v2h-3v-2h3zM4 11v2H1v-2h3z"/></svg>
<svg class="theme-icon-dark" viewBox="0 0 24 24" aria-hidden="true" focusable="false"><path d="M12.3 22a10 10 0 0 1-1.6-19.9c.6-.1 1 .5.8 1a7.9 7.9 0 0 0 9.7 10.6c.5-.2 1 .3.9.8A10 10 0 0 1 12.3 22z"/></svg>
</button>
</div>
</nav>
<main id="main-content">
<div class="page-header">
<div class="container">
<span class="section-label">Documentation</span>
<h1>CNA Documentation</h1>
<p>Everything you need to understand, build, and develop with CNA. Documentation is growing alongside the project - contributions welcome.</p>
</div>
</div>
<section class="section">
<div class="container">
<div class="callout callout--info">
<span class="callout-icon">💡</span>
<p>CNA is a work in progress. Documentation reflects the current state of the codebase and is updated as features are implemented. For the most authoritative source, consult the source code and README on <a href="https://github.com/openeggbert/cna" target="_blank" rel="noopener">GitHub</a>.</p>
</div>
<div class="callout callout--warn">
<span class="callout-icon">📚</span>
<p><strong>Doxygen API reference:</strong> CNA does not yet have a hosted Doxygen API reference. You can generate one locally: install <a href="https://www.doxygen.nl/" target="_blank" rel="noopener">Doxygen</a>, then run <code>doxygen Doxyfile</code> from the CNA repository root. The generated HTML will be in <code>docs/html/index.html</code>. Alternatively, browse the source headers directly at <a href="https://github.com/openeggbert/cna/tree/master/include/Microsoft/Xna/Framework/" target="_blank" rel="noopener"><code>include/Microsoft/Xna/Framework/</code> on GitHub</a>.</p>
</div>
<div class="cards">
<a href="docs/getting-started.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🚀</span>
<h3>Getting Started</h3>
<p>Quick introduction to CNA - what it is, prerequisites, first build, and a minimal game skeleton.</p>
<span class="tag tag-green mt-2">Start here</span>
</a>
<a href="docs/building.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🛠</span>
<h3>Building</h3>
<p>Full build instructions for Linux and Windows, renderer selection, cross-compilation with MinGW-w64, and optional system SDL.</p>
</a>
<a href="docs/releases.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">📌</span>
<h3>Releases & Versioning</h3>
<p>Current documented release 0.1.0-alpha.1, SemVer policy, generated C++ version API, tag naming and the separate C ABI version.</p>
<span class="tag tag-green mt-2">First tagged pre-release</span>
</a>
<a href="docs/platforms.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🌐</span>
<h3>Platforms</h3>
<p>Target support plus the independent SDL3/SDL2/Headless/Terminal host-platform and SDL3/SDL2/Null audio selections.</p>
</a>
<a href="docs/rendering-backends.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🎨</span>
<h3>Graphics Renderers</h3>
<p>Comparison and guide for all 50 selectable renderers - the OpenGL ES family, Vulkan, SDL_GPU, SDL_Renderer, bgfx, native Direct3D 1-12, Metal, FNA3D, browser Canvas/SVG/DOM, experimental WebGPU, and the GPU-free Headless/Software renderers - maturity tiers, test coverage, tradeoffs and when to use each.</p>
</a>
<a href="docs/runtime-renderer-selection.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">⇄</span>
<h3>Runtime Renderer Selection</h3>
<p>Opt-in multi-renderer builds, precedence, latching, explicit fallback, combination rules and diagnostics.</p>
</a>
<a href="docs/c-api.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">C</span>
<h3>Experimental Native C API</h3>
<p>ABI 0.7.0 source surface, measured inventory, intended package design and alpha.1's 49-versus-50 renderer-map compile blocker.</p>
</a>
<a href="docs/xna-compatibility.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">⚙</span>
<h3>XNA Compatibility</h3>
<p>API coverage measured type-by-type against FNA - what exists, what's missing, and where "present" does not mean "working".</p>
</a>
<a href="docs/verification.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🔬</span>
<h3>Verification & Known Issues</h3>
<p>How CNA is actually tested - and the complete, current list of what is broken. Read this before committing to a port.</p>
<span class="tag tag-orange mt-2">Start here before porting</span>
</a>
<a href="docs/effects.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">✨</span>
<h3>Effects System</h3>
<p>Built-in effects reference: BasicEffect, AlphaTestEffect, DualTextureEffect, EnvironmentMapEffect, SkinnedEffect, and custom ShaderEffect.</p>
</a>
<a href="docs/spritebatch.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🖼</span>
<h3>SpriteBatch</h3>
<p>Complete SpriteBatch guide covering Begin overloads, Draw overloads, SpriteSortMode, and BlendState configuration.</p>
</a>
<a href="docs/audio.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🎵</span>
<h3>Audio System</h3>
<p>Audio API reference: SoundEffect, SoundEffectInstance, MediaPlayer, Song, and the now-functional XACT runtime.</p>
</a>
<a href="docs/input.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🎮</span>
<h3>Input System</h3>
<p>Input handling guide for Keyboard, Mouse, GamePad, and TouchPanel across all supported platforms.</p>
</a>
<a href="docs/math-types.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🔢</span>
<h3>Math Types</h3>
<p>Math type reference: Vector2, Vector3, Vector4, Matrix, Quaternion, BoundingBox, Curve, and related utilities.</p>
</a>
<a href="docs/roadmap.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🗻</span>
<h3>Roadmap</h3>
<p>Detailed development roadmap - current sprint, upcoming milestones, and long-term vision.</p>
</a>
<a href="docs/faq.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">❓</span>
<h3>FAQ</h3>
<p>Frequently asked questions about CNA, its goals, differences from FNA/MonoGame, and how to contribute.</p>
</a>
</div>
<h2 class="mt-4">Subsystem reference</h2>
<p>Deeper reference for individual parts of the API.</p>
<div class="cards mt-2">
<a href="docs/3d-rendering.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🎭</span>
<h3>3D Rendering</h3>
<p>Vertex buffers, primitives, cameras, and the 3D pipeline.</p>
</a>
<a href="docs/graphics-state.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">⚖</span>
<h3>Graphics State</h3>
<p>BlendState, DepthStencilState, RasterizerState, SamplerState.</p>
</a>
<a href="docs/render-targets.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🖼</span>
<h3>Render Targets</h3>
<p>RenderTarget2D, RenderTargetCube, and multiple render targets.</p>
</a>
<a href="docs/shader-effects.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🎨</span>
<h3>Shader Effects</h3>
<p>Writing renderer-native GLSL/SPIR-V shaders with ShaderEffect. This is separate from alpha.1's renderer-qualified XNA Effect Framework bytecode path.</p>
</a>
<a href="docs/content-manager.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">📦</span>
<h3>ContentManager</h3>
<p>Asset loading with Load<T>(). Prefers a .xnb when one exists, falls back to loose files.</p>
</a>
<a href="docs/content-pipeline-xnb.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🗃</span>
<h3>XNB Content Pipeline</h3>
<p>Reading .xnb binaries: 50 type readers, a real LZX decompressor, and the honest gaps.</p>
</a>
<a href="docs/model-loading.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🏠</span>
<h3>Model Loading</h3>
<p>The gltf_to_cnj pipeline, XNB models, and the CNAEXT skeletal animation layer.</p>
</a>
<a href="docs/game-loop.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🔄</span>
<h3>Game Loop & Lifecycle</h3>
<p>Game, GameTime, GameComponent, and fixed vs variable timestep.</p>
</a>
<a href="docs/packed-vector.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🔢</span>
<h3>PackedVector Types</h3>
<p>All 17 packed vector types, with IEEE 754 half-float precision.</p>
</a>
<a href="docs/storage.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">💾</span>
<h3>Storage</h3>
<p>StorageDevice and StorageContainer for save games and user data.</p>
</a>
<a href="docs/video-playback.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">🎬</span>
<h3>Video Playback</h3>
<p>VideoPlayer and Song. FFmpeg-backed, desktop only.</p>
</a>
<a href="docs/sensors.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">📱</span>
<h3>Sensors</h3>
<p>Accelerometer and Gyroscope over the real SDL3 sensor API, Compass and Motion over the Android NDK, plus VibrateController.</p>
</a>
<a href="docs/vs-alternatives.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">⚖</span>
<h3>CNA vs Alternatives</h3>
<p>Honest comparison against FNA, MonoGame, and original XNA.</p>
</a>
<a href="docs/migration-from-monogame.html" class="card" style="text-decoration:none;color:inherit;">
<span class="card-icon">📂</span>
<h3>Migration from MonoGame / XNA</h3>
<p>Porting an existing C# game: asset conversion, property renaming, ownership patterns.</p>
</a>
</div>
<h2 class="mt-4">External references</h2>
<p>CNA targets compatibility with the Microsoft XNA 4.0 API. These external resources are useful for understanding the target API surface:</p>
<div class="cards cards--2 mt-2">
<div class="card">
<h3>Microsoft XNA 4.0 API Reference</h3>
<p>Official Microsoft documentation for XNA Game Studio 4.0 on Microsoft Learn.</p>
<a href="https://learn.microsoft.com/en-us/previous-versions/windows/xna/bb200104(v=xnagamestudio.41)" target="_blank" rel="noopener" class="btn btn-secondary btn-sm mt-2">Open ↗</a>
</div>
<div class="card">
<h3>FNA Documentation</h3>
<p>FNA is a managed C# reimplementation of XNA 4.0. Its documentation is a useful cross-reference.</p>
<a href="https://fna-xna.github.io/docs/" target="_blank" rel="noopener" class="btn btn-secondary btn-sm mt-2">Open ↗</a>
</div>
<div class="card">
<h3>MonoGame Documentation</h3>
<p>MonoGame extends the XNA API. Good reference for API patterns and expected behaviour.</p>
<a href="https://docs.monogame.net/articles/index.html" target="_blank" rel="noopener" class="btn btn-secondary btn-sm mt-2">Open ↗</a>
</div>
<div class="card">
<h3>SDL3 Documentation</h3>
<p>SDL3 is CNA's platform foundation. The SDL3 wiki is the reference for the underlying platform APIs.</p>
<a href="https://wiki.libsdl.org/SDL3/" target="_blank" rel="noopener" class="btn btn-secondary btn-sm mt-2">Open ↗</a>
</div>
</div>
</div>
</section>
</main>
<footer>
<div class="footer-inner">
<div class="footer-top">
<div class="footer-brand">
<div class="footer-brand-name">CNA</div>
<p>Documentation snapshot for CNA 0.1.0-alpha.1, the first tagged pre-release. CNA exposes 50 renderer identities across 46 implementation families; APIs may change before 1.0.</p>
</div>
<div class="footer-col">
<h4>Project</h4>
<ul>
<li><a href="about.html">About</a></li>
<li><a href="features.html">Features</a></li>
<li><a href="architecture.html">Architecture</a></li>
<li><a href="roadmap.html">Roadmap</a></li>
</ul>
</div>
<div class="footer-col">
<h4>Docs</h4>
<ul>
<li><a href="docs/getting-started.html">Getting Started</a></li>
<li><a href="docs/building.html">Building</a></li>
<li><a href="docs/platforms.html">Platforms</a></li>
<li><a href="docs/rendering-backends.html">Renderers</a></li>
<li><a href="docs/faq.html">FAQ</a></li>
</ul>
</div>
<div class="footer-col">
<h4>Community</h4>
<ul>
<li><a href="https://github.com/openeggbert/cna" target="_blank" rel="noopener">GitHub</a></li>
<li><a href="https://discord.gg/vrnc4n6DaE" target="_blank" rel="noopener">Discord</a></li>
<li><a href="demos.html">Demos</a></li>
<li><a href="videos.html">Videos</a></li>
<li><a href="contact.html">Contact</a></li>
</ul>
</div>
</div>
<div class="footer-bottom">
<p>CNA is not affiliated with or endorsed by Microsoft Corporation. XNA is a trademark of Microsoft. Licensed under the Microsoft Public License (Ms-PL).</p>
<div class="footer-links">
<a href="https://github.com/openeggbert/cna/blob/master/LICENSE" target="_blank" rel="noopener">License</a>
<a href="contact.html">Contact</a>
</div>
</div>
</div>
</footer>
<script src="js/main.js"></script>
<script src="js/prism/prism.min.js" defer></script>
<script src="js/prism/prism-cpp.min.js" defer></script>
<script src="js/prism/prism-glsl.min.js" defer></script>
<script src="js/prism/prism-json.min.js" defer></script>
<script src="js/prism/prism-bash.min.js" defer></script>
<script src="js/prism/prism-cmake.min.js" defer></script>
</body>
</html>