QhenkiX is a personal C++20 library for 3D software creation. It is centered around a render hardware interface (RHI) that abstracts graphics operations across multiple APIs. The project currently includes D3D12, D3D11, and Vulkan backend code paths, plus an examples workspace and a standalone shader compiler frontend (SXC). It aims to serve as a base for a game project while providing a way for me to experiment with graphics techniques and different graphics APIs.
You can find the core RHI interfaces in the RHI folder. Backend implementations live in QhenkiX/qhenki/graphics.
Current highlights:
- Multi-backend rendering architecture:
- D3D12 backend
- D3D11 backend
- Experimental Vulkan 1.4 backend
- Uses the cutting edge VK_EXT_descriptor_heap extension
- Uses all the modern Vulkan features, such as timeline semaphores, dynamic rendering, sync2, etc.
- Shaders can be shared across backends
- RHI design modeled to resemble D3D12
- Separate binding model support for modern and "compatibility" backends
- Allows for flexible and performant binding patterns such as bindless descriptors
- Fine-grained synchronization model with enhanced barrier-style concepts
- Standalone shader batch compiler tool: SXC
- Command line tool for parallel incremental compilation of shaders
- ImGui integration
- Utility modules for math, transforms, file IO, and memory
See Examples for use cases of the library.
- D3D12/D3D11 backend: Windows 10/11.
- Vulkan backend:
- Vulkan 1.4 core
- VK_EXT_DESCRIPTOR_HEAP_EXTENSION
- This requires installing the latest beta graphics drivers from NVIDIA or AMD Adrenalin Edition for Expanded Vulkan Extension.
- VK_EXT_MEMORY_BUDGET_EXTENSION
- VK_EXT_MEMORY_PRIORITY_EXTENSION
- VK_KHR_MAINTENANCE_9_EXTENSION
- VK_KHR_ROBUSTNESS_2_EXTENSION
- VK_GOOGLE_HLSL_FUNCTIONALITY_1_EXTENSION
- VK_GOOGLE_USER_TYPE_EXTENSION
-
Clone the repository with submodules.
git clone --recurse-submodules https://github.com/AaronTian-stack/QhenkiX.git
-
Generate build files using CMake.
cd QhenkiX mkdir build cd build cmake ..
-
Build the workspace.
cmake --build . --config ReleaseOr open the generated Visual Studio solution (
QhenkiX-Workspace.slnx) and build from there. -
Extend the Application class and start building your app. See Examples/README.md.
QhenkiX is built as a static library (.lib).
When using CMake, simply link against the QhenkiX target:
target_link_libraries(your_target PRIVATE QhenkiX)If you are creating a project using QhenkiX in Visual Studio, you can add QhenkiX as a reference (right click Project -> Add -> Reference) if they are in the same solution.
QhenkiX requires several shared libraries to run. When using CMake, the examples automatically copy the required DLLs to the output directory. If you writing your own project you will need to ensure the following DLLs are available in your executable's directory:
dxcompiler.dll- compile shaders with DXCdxil.dll- validate/sign shaders generated with DXCSDL3.dll- SDL3 runtime library
This project relies on the following dependencies and build tools:
Build Requirements:
- CMake 3.21 or higher
- C++20 compiler
Third-party Libraries:
- Boost - (Boost Software License 1.0)
- D3D12MemAllocator - (MIT License)
- D3D12DescriptorHelpers - (Public Domain)
- robin-map / tsl - (MIT License)
- DXC (DirectX Shader Compiler) - (LLVM/NCSA + MIT)
- DirectX Headers - (MIT License)
- DirectXMath - (MIT License)
- DirectXTex - (MIT License)
- SDL3 - (zlib License)
- Dear ImGui - (MIT License)
- Vulkan-Headers - (Apache 2.0)
- volk - (MIT License)
- vk-bootstrap - (MIT License)
- SPIRV-Cross - (Apache 2.0)
- Vulkan Memory Allocator - (MIT License)
- magic_enum - (MIT License)
- utf8cpp - (Boost Software License 1.0)
This project is primarily for personal use and and will be frequently subject to large breaking changes, so there is not any documentation currently besides certain select functions. However I will eventually create a wiki of some sort and also explain my design choices in detail...
- FXC depends on
d3dcompiler_47.dllwhich is not included with this library. It is included with the Windows SDK. I will eventually bundle a specific version of the DLL with the library.
This project is licensed under the MIT license.
