diff options
| author | Chia-I Wu <olv@lunarg.com> | 2014-10-25 12:47:33 +0800 |
|---|---|---|
| committer | Courtney Goeltzenleuchter <courtney@LunarG.com> | 2014-10-31 15:29:19 -0600 |
| commit | c42c39c53a42820a98f498380687a28fd0e5cc95 (patch) | |
| tree | 7a06453bef83063c68eda1f1fa474f8a3d0ce400 | |
| parent | 90b80cccba20210b86e1adeea65dab909ec23944 (diff) | |
| download | usermoji-c42c39c53a42820a98f498380687a28fd0e5cc95.tar.xz | |
demos/tri: make it prettier
And easier to see what the demo does.
| -rw-r--r-- | demos/tri.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/demos/tri.c b/demos/tri.c index b671b5b5..9aae4292 100644 --- a/demos/tri.c +++ b/demos/tri.c @@ -92,8 +92,8 @@ static void demo_draw_build_cmd(struct demo *demo) .depthState = XGL_IMAGE_STATE_TARGET_RENDER_ACCESS_OPTIMAL, .stencilState = XGL_IMAGE_STATE_TARGET_RENDER_ACCESS_OPTIMAL, }; - const XGL_FLOAT clear_color[4] = { 0.0f, 0.0f, 0.0f, 0.0f }; - const XGL_FLOAT clear_depth = 0.5f; + const XGL_FLOAT clear_color[4] = { 0.2f, 0.2f, 0.2f, 0.2f }; + const XGL_FLOAT clear_depth = 0.9f; XGL_IMAGE_SUBRESOURCE_RANGE clear_range; XGL_RESULT err; @@ -402,8 +402,8 @@ static void demo_prepare_vertices(struct demo *demo) { const float vb[3][5] = { /* position texcoord */ - { -1.0f, -1.0f, -1.0f, 0.0f, 0.0f }, - { 1.0f, -1.0f, -1.0f, 1.0f, 0.0f }, + { -1.0f, -1.0f, -0.6f, 0.0f, 0.0f }, + { 1.0f, -1.0f, -0.5f, 1.0f, 0.0f }, { 0.0f, 1.0f, 1.0f, 0.5f, 1.0f }, }; const XGL_MEMORY_ALLOC_INFO mem_alloc = { @@ -677,7 +677,7 @@ static void demo_prepare_dynamic_states(struct demo *demo) depth_stencil.sType = XGL_STRUCTURE_TYPE_DEPTH_STENCIL_STATE_CREATE_INFO; depth_stencil.depthTestEnable = XGL_TRUE; depth_stencil.depthWriteEnable = XGL_TRUE; - depth_stencil.depthFunc = XGL_COMPARE_GREATER; + depth_stencil.depthFunc = XGL_COMPARE_LESS_EQUAL; depth_stencil.depthBoundsEnable = XGL_FALSE; err = xglCreateViewportState(demo->device, &viewport, &demo->viewport); |
