XNA 4.0 Compatibility
API coverage table — current state, subject to change
⚠
This table reflects the current state of CNA's XNA 4.0 API coverage. Coverage is partial and growing incrementally. Check the source code and GitHub for the most up-to-date status. This page will lag behind the actual implementation.
Status legend:
Implemented
Partial
In Progress
Planned
Microsoft.Xna.Framework
| Class | Status | Notes |
Game | Partial | Core loop, LoadContent, Update, Draw. Some members missing. |
GameTime | Implemented | ElapsedGameTime, TotalGameTime, IsRunningSlowly. |
GameComponent | Implemented | |
DrawableGameComponent | Implemented | |
GameComponentCollection | Implemented | |
GameServiceContainer | Implemented | |
GameWindow | Partial | Title, basic window management. |
GraphicsDeviceInformation | Implemented | |
FrameworkDispatcher | Implemented | |
LaunchParameters | Implemented | |
TitleContainer | Partial | |
TitleLocation | Implemented | |
Color | Implemented | Predefined colours including CornflowerBlue. |
Vector2 | Implemented | |
Vector3 | Implemented | |
Vector4 | Implemented | |
Matrix | Implemented | |
Quaternion | Implemented | |
Point | Implemented | |
Rectangle | Implemented | |
BoundingBox | Implemented | |
BoundingSphere | Implemented | |
BoundingFrustum | Implemented | |
Plane | Implemented | |
Ray | Implemented | |
MathHelper | Implemented | Trig, Clamp, Lerp, etc. |
Curve | Implemented | |
CurveKey | Implemented | |
CurveKeyCollection | Implemented | |
Microsoft.Xna.Framework.Graphics
| Class | Status | Notes |
GraphicsDevice | Partial | Clear(), Present(), viewport. Backend delegating. |
GraphicsDeviceManager | Partial | Initialisation and device creation. |
SpriteBatch | Partial | Begin/Draw/End workflow. Basic overloads. |
Texture2D | Partial | Loading from file via SDL3_image. Backend-owned resource. |
Effect | Planned | |
BasicEffect | Planned | |
RenderTarget2D | Planned | |
VertexBuffer | Planned | |
IndexBuffer | Planned | |
VertexDeclaration | Planned | |
SpriteFont | Planned | |
Model | Planned | |
Microsoft.Xna.Framework.Input
| Class | Status | Notes |
| SDL input bridge | Implemented | Internal SDL3 event → CNA translation layer. |
Keyboard / KeyboardState | In Progress | |
Mouse / MouseState | In Progress | |
GamePad / GamePadState | Planned | |
Touch / TouchPanel | Planned | |
Microsoft.Xna.Framework.Audio
| Class | Status | Notes |
| SDL3_mixer integration | Partial | Foundational initialisation in place. |
SoundEffect | Planned | |
SoundEffectInstance | Planned | |
Song | Planned | |
MediaPlayer | Planned | |
Microsoft.Xna.Framework.Content
| Class | Status | Notes |
ContentManager | Planned | XNB content pipeline loading is a long-term goal. |
C++ API differences from C# XNA
While CNA mirrors XNA's API surface, there are necessary differences due to the C++ language:
- No garbage collection: Resources are managed with RAII and
std::unique_ptr / std::shared_ptr. Objects must be explicitly managed by the caller.
- No properties: C# properties become getter/setter methods (e.g.
getGraphicsDeviceProperty() instead of the C# GraphicsDevice property).
- No events: C# event delegates are replaced with virtual method overrides or callbacks where applicable.
- Namespace syntax:
Microsoft::Xna::Framework with :: instead of ..
- No extension methods, LINQ, or generics as they exist in C#.
Reference resources