demos/gears: Add a gears demo.

This commit is contained in:
Henri Verbeet
2016-11-02 14:56:13 +01:00
parent cd4f4a2976
commit 20508aee7c
11 changed files with 1115 additions and 9 deletions

View File

@@ -47,6 +47,10 @@
#define DEMO_KEY_UNKNOWN 0x0000
#define DEMO_KEY_ESCAPE 0xff1b
#define DEMO_KEY_LEFT 0xff51
#define DEMO_KEY_UP 0xff52
#define DEMO_KEY_RIGHT 0xff53
#define DEMO_KEY_DOWN 0xff54
struct demo_vec3
{
@@ -68,6 +72,21 @@ struct demo_swapchain_desc
typedef uint32_t demo_key;
static inline void demo_vec3_set(struct demo_vec3 *v, float x, float y, float z)
{
v->x = x;
v->y = y;
v->z = z;
}
static inline void demo_vec4_set(struct demo_vec4 *v, float x, float y, float z, float w)
{
v->x = x;
v->y = y;
v->z = z;
v->w = w;
}
static inline void demo_rasterizer_desc_init_default(D3D12_RASTERIZER_DESC *desc)
{
desc->FillMode = D3D12_FILL_MODE_SOLID;