Home

Awesome

tinyrenderers

Single header implemenations of Vulkan and D3D12 renderers

Features

Notes

Compiling and Linking

In one C/C++ file that #includes the renderer's header file, do this:

#define TINY_RENDERER_IMPLEMENTATION
#include "tinyvk.h"

or

#define TINY_RENDERER_IMPLEMENTATION
#include "tinydx.h"

Building on Linux

git clone --recursive git@github.com:chaoticbob/tinyrenderers.git
cd tinyrenderers
mkdir build
cd build
cmake ..
make

Ubuntu and variants will require the follow packages

libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev

Building on Windows

git clone --recursive git@github.com:chaoticbob/tinyrenderers.git
cd tinyrenderers
mkdir build
cd build
cmake -G "Visual Studio 14 2015 Win64" ..

Open tinyrenderers.sln and go

Screenshots

Change Log

[2017/11/12] - Added simple tessellation shader sample. Fixed misc issues with pipeline setup for tessellation. [2017/11/10] - Added ChessSet demo. Added geometry shader sample. Fixes to depth stencil handling. [2017/11/10] - Added TexturedCube sample. Updated depth attachment handling on swapchain render pass. Switched out lc_image for stb_image. Added DXC shader build script. [2017/05/27] - Fixed some annoying buffer state transitions. Added build script for shaders. Updated shader naming convention to be more exact. Added OpaqueArgs and PassingArrays for investigation.<br> [2017/05/20] - Updated Append/Consume sample for Vulkan. Requires latest glslang. ConstantBuffer also works for both platforms.<br> [2017/05/13] - Added Linux support. Moved to project files to cmake. Moved glsl shaders to glsl sub directory - forcing HLSL for now.<br> [2017/04/30] - Clarified shader usage in some sample programs to point out which source they're coming from.<br> [2017/04/27] - Added ConstantBuffer sample (D3D12 only for now). Updated Vulkan samples to use negative viewport height.<br> [2017/04/25] - Updated SimpleCompute and StructuredBuffer to work on Vulkan.<br> [2017/04/24] - Added compute samples (D3D12 only for now). One for simple compute and another for structured buffers.