diff options
| author | ladevieq <ladevie.quentin@gmail.com> | 2022-09-08 23:04:06 +0200 |
|---|---|---|
| committer | ladevieq <ladevie.quentin@gmail.com> | 2022-09-08 23:04:06 +0200 |
| commit | 2d16fbd7e235bf2cc96d451469d8d39cae1917c3 (patch) | |
| tree | ab565ca756c6341ec36f91835d548cfd989b6e1f /src/main.cpp | |
| parent | b7c2511e588f1da63413a38a624fd3e6bb8cf54d (diff) | |
First render using new texture uploading system
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5e39a09..805a0b4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -319,8 +319,8 @@ int main() { renderer.recreate_swapchain(); main_scene.meta.cam.set_aspect_ratio((float)event.width / (float)event.height); - vkrenderer::destroy_2d_texture(accumulation_texture); - vkrenderer::destroy_2d_texture(output_texture); + delete accumulation_texture; + delete output_texture; accumulation_texture = vkrenderer::create_2d_texture(event.width, event.height, VK_FORMAT_R32G32B32A32_SFLOAT); output_texture = vkrenderer::create_2d_texture(event.width, event.height, VK_FORMAT_R32G32B32A32_SFLOAT); raytracing_pass->set_dispatch_size(event.width / 8 + 1, event.height / 8 + 1, 1); @@ -406,6 +406,8 @@ int main() { raytracing_pass->set_ouput_texture(output_texture); raytracing_pass->set_constant(60, accumulation_texture); + renderer.begin_frame(); + // update_ui(main_scene, delta_time); if (can_render) { @@ -414,6 +416,8 @@ int main() { std::swap(output_texture, accumulation_texture); } + renderer.finish_frame(); + frame_count++; } |
