Architecture Overview
How Nova-3D is structured internally, and why internal layers are deliberately hidden from user code.
Layer Diagram
Each layer depends only on the layer below it. Dependencies always flow downward.
Nova3D::Application — calls only Nova-3D public API
Camera • Renderer • Input • Log • Math types
src/Nova3D/ — private implementation, CNA adapter classes
internal
Layer Details
Your Game / Application Code
This is the only layer you write. Subclass Nova3D::Application, override Start() and Update(), and use the Nova-3D public API to build scenes, add components, read input, and control rendering. Your code never includes CNA, sharp-runtime, or any backend headers.
Nova-3D Public API
The public engine API, exposed through include/Nova3D/. Inspired by Urho3D-style engine design: a context owns subsystems, scenes contain nodes, and nodes hold components. All public symbols are in the Nova3D namespace.
Key design rules for the public API:
- Never include CNA, sharp-runtime, or backend headers from public headers
- Use PIMPL or internal adapter classes to hide implementation details
- API style follows Urho3D conventions:
GetContext(),CreateChild(),CreateComponent<T>() - All math types (
Vector2,Vector3,Quaternion,Color) are Nova-3D types
// Example: public API usage (your application code) auto* scene = new Nova3D::Scene(GetContext()); auto* node = scene->CreateChild("Camera"); node->SetPosition(Nova3D::Vector3(0, 2, -5)); auto* cam = node->CreateComponent<Nova3D::Camera>();
Nova-3D Engine Systems & Internal Adapter internal
Located in src/Nova3D/. This is the bridge between the public API and CNA. Adapter classes like Nova3D::Internal::CnaAdapter translate Nova-3D concepts into CNA calls without exposing CNA types through public headers.
CNA — C++ XNA 4.0 Reimplementation internal
CNA is a C++ reimplementation of the XNA 4.0 API. It provides the graphics pipeline, content loading, audio, and input at the XNA level. CNA is deliberately kept XNA-like — it does not contain Urho3D or Nova-3D concepts. It is a private CMake dependency of Nova-3D and is never exposed in public headers.
sharp-runtime — .NET-like Support Layer internal
sharp-runtime provides .NET-inspired utilities in C++: collections, string types, and runtime support helpers. Like CNA, it is a private dependency and is never visible through public Nova-3D headers. It does not depend on Nova-3D.
Platform Backend internal
The lowest layer. SDL3 provides windowing, input events, and platform abstraction. OpenGL (through EasyGL) and optionally bgfx provide the graphics API. Platform-specific code (Android JNI, Emscripten callbacks) lives here. Nothing from this layer is visible through public Nova-3D headers.
Directory Structure
nova-3d/ ├── include/Nova3D/ ← Public API headers only │ ├── Nova3D.h ← Master include │ ├── Context.h │ ├── Engine.h │ ├── Application.h │ ├── Scene.h │ ├── Node.h │ ├── Component.h │ ├── Camera.h │ ├── Renderer.h │ ├── Log.h │ ├── Math/ ← Vector2, Vector3, Quaternion, Color │ ├── Input/ ← Input subsystem │ ├── Graphics/ ← Viewport │ └── Container/ ← Smart pointers │ ├── src/Nova3D/ ← Private implementation │ ├── *.cpp ← Public API implementation │ └── Internal/ ← CNA adapter (private) │ ├── CnaAdapter.h │ └── CnaAdapter.cpp │ ├── examples/ ← Example applications ├── tests/ ← Engine tests └── android/ ← Android build infrastructure
Dependency Rules
✓ Allowed
- Your code depends on
Nova3Dpublic headers Nova3Dinternals depend on CNA privately- CNA depends on sharp-runtime privately
- CNA depends on SDL3/OpenGL/EasyGL
✗ Forbidden
- CNA depending on Nova-3D (reverse dependency)
- CNA types appearing in Nova-3D public headers
- sharp-runtime types appearing in public headers
- OpenGL/SDL types appearing in public headers