DirectX 12 Seed
A DirectX 12 repo you can use to get started with your own renderer.
Setup
First install:
Then type the following in your terminal.
# ๐ Clone the repo
git clone https://github.com/alaingalvan/directx12-seed --recurse-submodules
# ๐ฟ go inside the folder
cd directx12-seed
# ๐ฏ If you forget to `recurse-submodules` you can always run:
git submodule update --init
# ๐ท Make a build folder
mkdir build
cd build
# ๐ผ๏ธ To build your Visual Studio solution on Windows x64
cmake .. -A x64
# ๐จ Build project
cmake --build .
Refer to this blog post on designing C++ libraries and apps for more details on CMake, Git Submodules, etc.
Project Layout
As your project becomes more complex, you'll want to separate files and organize your application to something more akin to a game or renderer, check out this post on game engine architecture and this one on real time renderer architecture for more details.
โโ ๐ external/ # ๐ถ Dependencies
โ โโ ๐ crosswindow/ # ๐ผ๏ธ OS Windows
โ โโ ๐ crosswindow-graphics/ # ๐จ DirectX 12 Swapchain Creation
โ โโ ๐ glm/ # โ Linear Algebra
โโ ๐ src/ # ๐ Source Files
โ โโ ๐ Utils.h # โ๏ธ Utilities (Load Files, Check Shaders, etc.)
โ โโ ๐ Renderer.h # ๐บ Triangle Draw Code
โ โโ ๐ Renderer.cpp # -
โ โโ ๐ Main.cpp # ๐ Application Main
โโ ๐ .gitignore # ๐๏ธ Ignore certain files in git repo
โโ ๐ CMakeLists.txt # ๐จ Build Script
โโ ๐ license.md # โ๏ธ Your License (Unlicense)
โโ ๐readme.md # ๐ Read Me!