Rendering
How Nova-3D renders your scenes: the Renderer subsystem, Camera, and viewport setup.
Renderer
Nova3D::Renderer is the rendering subsystem accessed via the context. It manages the rendering pipeline behind the scenes — you do not call OpenGL or backend functions directly from your application code.
auto* renderer = GetContext()->GetRenderer();
The Renderer is set up automatically when the Engine initializes. For most applications, you interact with it indirectly through Camera and scene nodes.
Camera
Nova3D::Camera is a component attached to a node that defines the view. The renderer reads from the active camera to set up view and projection matrices.
// Create a camera node and attach a Camera component
auto* cameraNode = scene->CreateChild("MainCamera");
cameraNode->SetPosition(Nova3D::Vector3(0.0f, 2.0f, -5.0f));
auto* camera = cameraNode->CreateComponent<Nova3D::Camera>();
camera->SetFov(60.0f); // field of view in degrees
camera->SetNearClip(0.1f); // near clip plane
camera->SetFarClip(1000.0f); // far clip plane
Viewport
The viewport defines which area of the screen the camera renders to. Nova3D::Graphics::Viewport is in the public headers. The viewport API is being developed alongside the renderer.
// Basic viewport — covers the full window (default) auto* viewport = new Nova3D::Graphics::Viewport(GetContext(), scene, camera);
Rendering Pipeline
Under the hood, Nova-3D uses CNA as the internal rendering layer, which wraps EasyGL/OpenGL via SDL3. This pipeline is completely hidden from your application code:
Your Application
-> Nova3D::Renderer (public API)
-> Nova3D::Internal::CnaAdapter (hidden)
-> CNA GraphicsDevice (hidden)
-> EasyGL / OpenGL / SDL3 (hidden)
You never call CNA or OpenGL functions from user code.
Clearing and Colors
The background clear color is set on the renderer:
renderer->SetClearColor(Nova3D::Color(0.1f, 0.1f, 0.15f, 1.0f));
Planned: Mesh and Material API
The planned public API will look like:
// Future API (not yet implemented)
auto* modelNode = scene->CreateChild("Box");
auto* model = modelNode->CreateComponent<Nova3D::StaticModel>();
model->SetModel(cache->GetResource<Nova3D::Model>("Models/Box.mdl"));
auto* mat = new Nova3D::Material(GetContext());
mat->SetShaderParameter("MatDiffColor", Nova3D::Color::RED);
model->SetMaterial(mat);