render command_block

This commit is contained in:
2018-10-25 18:49:32 +07:00
parent 774368a0a4
commit 8d5758c2d7
7 changed files with 452 additions and 104 deletions

View File

@@ -247,11 +247,10 @@ int e2d_main() {
.property("u_time", game_time)
.property("u_MVP", MVP);
the<render>()
.clear_depth_buffer(1.f)
.clear_stencil_buffer(0)
.clear_color_buffer({1.f, 0.4f, 0.f, 1.f})
.draw(material, geometry);
the<render>().execute(render::command_block<64>()
.add_command(render::clear_command()
.color_value({1.f, 0.4f, 0.f, 1.f}))
.add_command(render::draw_command(material, geometry)));
the<window>().swap_buffers(true);
the<input>().frame_tick();