Getting Started
Getting Started with Nova-3D
Clone the repository, build the engine, and run your first Nova-3D application in a few minutes.
Early Prototype
Nova-3D is in active development. The build process and API may change. This guide reflects the current state of the
develop branch.
Prerequisites
Before you start, make sure you have the following installed:
- CMake ≥ 3.21
- C++23-capable compiler: GCC 13+, Clang 16+, or MSVC 2022
- Git
- SDL3 and OpenGL development libraries (on Linux:
libsdl3-dev,libgl-dev) - The CNA and sharp-runtime sibling repositories checked out alongside
nova-3d
Sibling repositories
Nova-3D depends on CNA and sharp-runtime as sibling directories. Clone them at the same directory level as
nova-3d. See Building for details.
Clone and Build
Linux / macOS
# Clone the repository git clone https://github.com/openeggbert/nova-3d.git cd nova-3d # Configure with CMake cmake -S . -B build # Build the Hello World example cmake --build build --target Nova3DHelloWorld # Run it ./build/Nova3DHelloWorld
Windows
git clone https://github.com/openeggbert/nova-3d.git cd nova-3d cmake -S . -B build cmake --build build --target Nova3DHelloWorld .\build\Nova3DHelloWorld.exe
Run the 3D Demo
cmake --build build --target Nova3DCube3DDemo ./build/Nova3DCube3DDemo
This opens a window with the Cube 3D demo: a 3D box rendered through the full Nova-3D stack.
Hello World — Code Walkthrough
Here is the minimal Nova-3D application. The examples/ directory contains this and more.
#include <Nova3D/Nova3D.h>
#include <iostream>
class HelloWorldApp : public Nova3D::Application {
public:
explicit HelloWorldApp(Nova3D::Context* context)
: Nova3D::Application(context) {}
void Start() override {
std::cout << "Nova-3D Hello World\n";
GetContext()->GetEngine()->Exit();
}
};
int main() {
Nova3D::Context context;
HelloWorldApp app(&context);
return app.Run();
}
What this does:
- Creates a
Nova3D::Context— the top-level owner of all engine subsystems. - Creates an
Applicationsubclass and passes it the context. - Calls
app.Run()— this initializes the engine, callsStart(), runs the main loop, and shuts down. - In
Start(), it prints a message and exits immediately viaEngine::Exit().