How thegameengineers/primal works
Primal Engine is a native C++ 3D engine with a WPF editor and native asset-processing tools. The principal workflow is authoring a project and scene in the editor, editing entities and assets, then crossing the Engine DLL boundary to update or run the native engine and render through Direct3D 12. Asset import and project serialization are distinct authoring stages; runtime content conversion and renderer resource handling form an internal engine layer. Arrows follow README descriptions or source-index references; unsampled implementation details are not inferred.
Main entry points: Project.cs Project and scenes · EngineAPI.cpp Engine DLL · EngineWin32.cpp Engine lifecycle · AssetRegistry.cs Asset registry
Components 21
Editor authoring
- Project and scenes
PrimalEditor/GameProject/Project.cs - Project cooking
PrimalEditor/GameProject/Chef.cs - Scene entities
PrimalEditor/Components/GameEntity.cs - Entity components
PrimalEditor/Components/Script.cs
Asset pipeline
- Asset registry
PrimalEditor/Content/AssetRegistry.cs - Asset browser
PrimalEditor/Content/ContentBrowser/ContentBrowserView.xaml.cs - Geometry assets
PrimalEditor/Content/Geometry.cs - Default assets
PrimalEditor/Content/DefaultAssets.cs - Asset import tools
ContentTools/ContentTools.cpp - FBX processing
ContentTools/FbxImporter.cpp - Texture processing
ContentTools/TextureImporter.cpp
Native interface
- Editor API
Engine/EditorAPI/EditorAPI.cpp - Managed API wrapper
PrimalEditor/DllWrappers/EngineAPI.cs - Engine DLL
EngineDLL/EngineAPI.cpp
Engine runtime
- Engine lifecycle
Engine/Core/EngineWin32.cpp - Runtime content
Engine/Content/ContentToEngine.cpp - Platform and input
Engine/Platform/PlatformWin32.cpp
Graphics backend
- Renderer
Engine/Graphics/Renderer.cpp - Direct3D 12
Engine/Graphics/Direct3D12/D3D12Core.cpp - Shader compilation
EngineDLL/ShaderCompilation.cpp
Other components
- Editor user
Connections 22
- Editor user → Project and scenes: authors
- Project and scenes → Scene entities: edits scenes
PrimalEditor/GameProject/Project.cs - Scene entities → Entity components: contains data
PrimalEditor/Components/GameEntity.cs - Project and scenes → Project cooking: cooks project
PrimalEditor/GameProject/Project.cs - Project and scenes → Managed API wrapper: uses engine API
PrimalEditor/GameProject/Project.cs - Scene entities → Managed API wrapper: updates engine
PrimalEditor/Components/GameEntity.cs - Editor user → Asset browser: browses assets
- Asset browser → Asset registry: manages assets
- Asset registry → Geometry assets: tracks geometry
PrimalEditor/Content/Geometry.cs - Default assets → Asset registry: registers assets
PrimalEditor/Content/DefaultAssets.cs - Asset browser → Asset import tools: imports assets
- Asset import tools → FBX processing: processes models
- Asset import tools → Texture processing: processes textures
- Managed API wrapper → Engine DLL: calls native API
- Engine DLL → Editor API: exposes editor API
EngineDLL/EngineAPI.cpp - Engine DLL → Engine lifecycle: initializes runtime
EngineDLL/EngineAPI.cpp - Engine lifecycle → Runtime content: loads content
Engine/Core/EngineWin32.cpp - Engine lifecycle → Platform and input: initializes input
Engine/Core/EngineWin32.cpp - Engine lifecycle → Renderer: initializes graphics
Engine/Core/EngineWin32.cpp - Renderer → Direct3D 12: uses backend
- Engine DLL → Shader compilation: compiles shaders
EngineDLL/EngineAPI.cpp - Project cooking → Asset registry: serializes assets
PrimalEditor/GameProject/Chef.cs