Skip to content

Commit

Permalink
readme
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNumbat committed Jan 15, 2024
1 parent 93c5167 commit 35f9199
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,22 @@ i32 main() {
},
});

rvk::Drop<rvk::Image> target{move(*rvk::make_image({1280, 720, 1}, VK_FORMAT_R8G8B8A8_UNORM,
VK_IMAGE_USAGE_SAMPLED_BIT))};
rvk::sync([&](rvk::Commands& cmds) {
target->setup(cmds, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
});
{
rvk::Drop<rvk::Image> target{move(*rvk::make_image({1280, 720, 1}, VK_FORMAT_R8G8B8A8_UNORM,
VK_IMAGE_USAGE_SAMPLED_BIT))};
rvk::sync([&](rvk::Commands& cmds) {
target->setup(cmds, VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL);
});

rvk::Drop<rvk::Image_View> target_view{target->view(VK_IMAGE_ASPECT_COLOR_BIT)};
rvk::Drop<rvk::Image_View> target_view{target->view(VK_IMAGE_ASPECT_COLOR_BIT)};

while(/* running */) {
rvk::begin_frame();
while(/* User hasn't quit */) {
rvk::begin_frame();

// Do your rendering...
// Do your rendering...

rvk::end_frame(target_view):
rvk::end_frame(target_view):
}
}

rvk::shutdown();
Expand Down

0 comments on commit 35f9199

Please sign in to comment.