Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/alaingalvan/directx12-seed

βœ–πŸŒ± A DirectX 12 starter repo that you could use to get the ball rolling.
https://github.com/alaingalvan/directx12-seed

directx introduction seed

Last synced: 19 days ago
JSON representation

βœ–πŸŒ± A DirectX 12 starter repo that you could use to get the ball rolling.

Awesome Lists containing this project

README

        

![Cover Art](https://alain.xyz/blog/raw-directx12/assets/cover.jpg)

# DirectX 12 Seed

[![cmake-img]][cmake-url]
[![License][license-img]][license-url]

A DirectX 12 repo you can use to get started with your own renderer.

## Setup

First install:

- [Git](https://git-scm.com/)

- [CMake](https://cmake.org)

- [Visual Studio](https://visualstudio.microsoft.com/downloads/)

Then type the following in your [terminal](https://hyper.is/).

```bash
# πŸ‘ 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](https://alain.xyz/blog/designing-a-cpp-library) 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](https://alain.xyz/blog/game-engine-architecture) and this one on [real time renderer architecture](https://alain.xyz/blog/realtime-renderer-architectures) for more details.

```bash
β”œβ”€ πŸ“‚ 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!
```

[cmake-img]: https://img.shields.io/badge/cmake-3.6-1f9948.svg?style=flat-square
[cmake-url]: https://cmake.org/
[license-img]: https://img.shields.io/:license-mit-blue.svg?style=flat-square
[license-url]: https://opensource.org/licenses/MIT