diff options
author | quou <quou@disroot.org> | 2024-12-29 11:28:19 +1100 |
---|---|---|
committer | quou <quou@disroot.org> | 2024-12-29 11:28:19 +1100 |
commit | dfd95c6e29c25c3ad9acc3e63a790da866339015 (patch) | |
tree | 07a96430f287a4f5303149b97e4adde2e1f67af0 /c2.cpp | |
parent | 82c03019867ed57d35932e5eb015c7e77f8bf1ea (diff) |
seperate framebuffers and renderpasses; depth buffering.
Diffstat (limited to 'c2.cpp')
-rw-r--r-- | c2.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -174,12 +174,12 @@ extern "C" int entrypoint() { dev->unmap_buffer(cbuf2); } - Pipeline_Builder pb(&frame_arena); + Pipeline_Builder pb(&frame_arena, dev); pb.begin_rp(); pb.rp_target(dev->get_backbuffer(), { r, 0x00, 0xff, 0xff }); Render_Pass& pass = pb.build_rp(); - pb.begin(dev); + pb.begin(); pb.shader(shader->id); pb.vertex_format(shader->vf); pb.texture( @@ -208,6 +208,7 @@ extern "C" int entrypoint() { pb.begin_rp(); pb.rp_target(dev->get_backbuffer(), Clear_Mode::restore); + pb.rp_depth_target(dev->get_depth_target(), 1.0f); Render_Pass& pass2 = pb.build_rp(); monkey->render(dev, &frame_arena, pass2, cbuf2); |