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

ClassStatusNotes
GamePartialCore loop, LoadContent, Update, Draw. Some members missing.
GameTimeImplementedElapsedGameTime, TotalGameTime, IsRunningSlowly.
GameComponentImplemented
DrawableGameComponentImplemented
GameComponentCollectionImplemented
GameServiceContainerImplemented
GameWindowPartialTitle, basic window management.
GraphicsDeviceInformationImplemented
FrameworkDispatcherImplemented
LaunchParametersImplemented
TitleContainerPartial
TitleLocationImplemented
ColorImplementedPredefined colours including CornflowerBlue.
Vector2Implemented
Vector3Implemented
Vector4Implemented
MatrixImplemented
QuaternionImplemented
PointImplemented
RectangleImplemented
BoundingBoxImplemented
BoundingSphereImplemented
BoundingFrustumImplemented
PlaneImplemented
RayImplemented
MathHelperImplementedTrig, Clamp, Lerp, etc.
CurveImplemented
CurveKeyImplemented
CurveKeyCollectionImplemented

Microsoft.Xna.Framework.Graphics

ClassStatusNotes
GraphicsDevicePartialClear(), Present(), viewport. Backend delegating.
GraphicsDeviceManagerPartialInitialisation and device creation.
SpriteBatchPartialBegin/Draw/End workflow. Basic overloads.
Texture2DPartialLoading from file via SDL3_image. Backend-owned resource.
EffectPlanned
BasicEffectPlanned
RenderTarget2DPlanned
VertexBufferPlanned
IndexBufferPlanned
VertexDeclarationPlanned
SpriteFontPlanned
ModelPlanned

Microsoft.Xna.Framework.Input

ClassStatusNotes
SDL input bridgeImplementedInternal SDL3 event → CNA translation layer.
Keyboard / KeyboardStateIn Progress
Mouse / MouseStateIn Progress
GamePad / GamePadStatePlanned
Touch / TouchPanelPlanned

Microsoft.Xna.Framework.Audio

ClassStatusNotes
SDL3_mixer integrationPartialFoundational initialisation in place.
SoundEffectPlanned
SoundEffectInstancePlanned
SongPlanned
MediaPlayerPlanned

Microsoft.Xna.Framework.Content

ClassStatusNotes
ContentManagerPlannedXNB 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