โœ–๐ŸŒฑ A DirectX 12 starter repo that you could use to get the ball rolling.

Overview

Cover Art

DirectX 12 Seed

cmake-img License

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!
You might also like...
Epoxy is a library for handling OpenGL function pointer management for you

Epoxy is a library for handling OpenGL function pointer management for you. It hides the complexity of dlopen(), dlsym(), glXGetProcAddress(), eglGetP

nsfminer is an Ethash GPU mining application: with nsfminer you can mine every coin which relies on an Ethash Proof of Work.

nsfminer (no stinkin' fees) Ethereum (ethash) miner with OpenCL, CUDA and stratum support nsfminer is an Ethash GPU mining application: with nsfminer

Flutter package that lets you simply animate a widget into a visible state.
Flutter package that lets you simply animate a widget into a visible state.

Entry This Flutter package introduces a new widget : Entry. It lets you simply animate a widget into a visible state. Don't just display widgets : mak

OpenGL Object Loading can load virtually every 3d.obj file you can find on the internet, without using another object loading library
OpenGL Object Loading can load virtually every 3d.obj file you can find on the internet, without using another object loading library

OpenGL Object Loading can load virtually every 3d.obj file you can find on the internet, without using another object loading library (assimp for example). The program can load Object with 12M+ triangles and more

Teracube 2e (4.19.y) - Extremely bleeding edge, you have been warned

Linux kernel ============ There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML an

A C++ commandline for use in servers and chat software. Provides very simple asynchronous input/output.
A C++ commandline for use in servers and chat software. Provides very simple asynchronous input/output.

commandline A C++ commandline for use in servers and terminal chat software. Provides very simple asynchronous input/output. Supports reading and writ

StereoKit is an easy-to-use open source mixed reality library for building HoloLens and VR applications with C# and OpenXR!
StereoKit is an easy-to-use open source mixed reality library for building HoloLens and VR applications with C# and OpenXR!

StereoKit is an easy-to-use open source mixed reality library for building HoloLens and VR applications with C# and OpenXR! Inspired by libraries like XNA and Processing, StereoKit is meant to be fun to use and easy to develop with, yet still quite capable of creating professional and business ready software.

A minimalist library with basic facilities for developing interactive real-time 3D applications, with a strong emphasis on simplicity and ease of use.
A minimalist library with basic facilities for developing interactive real-time 3D applications, with a strong emphasis on simplicity and ease of use.

SlimEngine A minimalist and platform-agnostic base project for interactive graphical applications (2D/3D) with a strong emphasis on simplicity, ease o

Software ray tracer written from scratch in C that can run on CPU or GPU with emphasis on ease of use and trivial setup
Software ray tracer written from scratch in C that can run on CPU or GPU with emphasis on ease of use and trivial setup

A minimalist and platform-agnostic interactive/real-time raytracer. Strong emphasis on simplicity, ease of use and almost no setup to get started with

Comments
  • Assets not included in 'cmake-build-debug/bin/assets'

    Assets not included in 'cmake-build-debug/bin/assets'

    Built fine, but trying to execute the program an exception was thrown while loading the assets. Some simple debugging directed me to missing assets in the cmake-build-debug/bin/assets.

    I resolved it by moving the files from 'directx12-seed/assets' to 'cmake-build-debug/bin/assets'.

    I followed the steps per the readme. Maybe something was preventing the files to be moved during build? Still learning a lot of this stuff so I'm not exactly sure.. Just thought I'd leave this here in case anyone else had same issue.

    BTW, love the repo. Great place to start learning!

    opened by lordliquid 0
Owner
Alain Galvan
Driver Engineer @ AMD. Prev. Graphics Software Engineer @ Marmoset. Writes alot about ๐Ÿ”บ Computer Graphics, ๐ŸŽจ Art & ๐Ÿ—๏ธ Software Engineering! Personal GithHub.
Alain Galvan
The DirectX Shader Compiler project includes a compiler and related tools used to compile High-Level Shader Language (HLSL) programs into DirectX Intermediate Language (DXIL) representation

DirectX Shader Compiler The DirectX Shader Compiler project includes a compiler and related tools used to compile High-Level Shader Language (HLSL) pr

Microsoft 2.4k Jan 3, 2023
This repo contains the DirectX Graphics samples that demonstrate how to build graphics intensive applications on Windows.

DirectX-Graphics-Samples This repo contains the DirectX 12 Graphics samples that demonstrate how to build graphics intensive applications for Windows

Microsoft 4.9k Dec 26, 2022
OpenGLยฎ-Starter is a template for your upcoming OpenGL Projects which has been compiled to run the most basic Hello World OpenGL Program from LearnOpenGL.com.

OpenGLยฎ-Starter OpenGLยฎ-Starter is a template for your upcoming OpenGL Projects which has been compiled to run the most basic Hello World OpenGL Progr

Kushagra 9 Sep 7, 2022
A C++/DirectX 11 implementation of "A Scalable and Production Ready Sky and Atmosphere Rendering Technique"

Atmosphere Renderer A C++/DirectX 11 implementation of "A Scalable and Production Ready Sky and Atmosphere Rendering Technique" Features interactive e

Z Guan 37 Nov 20, 2022
DirectX shader bytecode cross compiler

HLSLcc DirectX shader bytecode cross compiler. Originally based on https://github.com/James-Jones/HLSLCrossCompiler. This library takes DirectX byteco

Unity Technologies 742 Dec 29, 2022
Playground for DirectX 11 / 12 simple graphics demo examples ...

graphicsdemoskeleton Playground for DirectX 11 / 12 simple graphics demo examples ... If anyone from Microsoft reads this: C99 support is broken in Di

Wolfgang Engel 44 Dec 10, 2022
DirectX 11 and 12 library that provides a scalable and GCN-optimized solution for deferred shadow filtering

AMD ShadowFX The ShadowFX library provides a scalable and GCN-optimized solution for deferred shadow filtering. Currently the library supports uniform

GPUOpen Effects 163 Dec 9, 2022
A real-time DirectX 11 renderer. The renderer is named by my girlfriend's english name.

sophia Sophia is a real-time DirectX 11 renderer. It is not quite a rich graphics engine, only packages some low-level DirectX functions and contains

BB 6 Dec 11, 2021
Simple console tool to get all the information from DXGI and Direct3D 12 on current system

D3d12info Simple console tool to get all the information from DXGI and Direct3D 12 (D3D12) on current system. Built and tested on Windows 10 64-bit us

Adam Sawicki 40 Dec 8, 2022
This repo will sort of document my story of learning vulkan with VulkanSDK and cl (msvc) on windows.

Learning Vulkan This repo is a means of documenting my journey with learning Vulkan's basics on windows. Because of the binaries in the LunarG VulkanS

null 2 Dec 8, 2021