Skip to content

AaronTian-stack/QhenkiX

Repository files navigation

QhenkiX Logo

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.

Features

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.

System Requirements

  • D3D12/D3D11 backend: Windows 10/11.
  • Vulkan backend:
    • Vulkan 1.4 core
    • VK_EXT_DESCRIPTOR_HEAP_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

Installation / Build

  1. Clone the repository with submodules.

    git clone --recurse-submodules https://github.com/AaronTian-stack/QhenkiX.git
  2. Generate build files using CMake.

    cd QhenkiX
    mkdir build
    cd build
    cmake ..
  3. Build the workspace.

    cmake --build . --config Release

    Or open the generated Visual Studio solution (QhenkiX-Workspace.slnx) and build from there.

  4. Link the library to your app.

  5. Extend the Application class and start building your app. See Examples/README.md.

Linking

QhenkiX is built as a static library (.lib).

Using CMake

When using CMake, simply link against the QhenkiX target:

target_link_libraries(your_target PRIVATE QhenkiX)

Using Visual Studio

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.

Required Runtime Shared Libraries

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:

Windows

  • dxcompiler.dll - compile shaders with DXC
  • dxil.dll - validate/sign shaders generated with DXC
  • SDL3.dll - SDL3 runtime library

Dependencies

This project relies on the following dependencies and build tools:

Build Requirements:

  • CMake 3.21 or higher
  • C++20 compiler

Third-party Libraries:

Documentation

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...

Notes

  • FXC depends on d3dcompiler_47.dll which 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.

License

This project is licensed under the MIT license.

About

DirectX/Vulkan RHI and Graphics Library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages