Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

WIP #18

wants to merge 1 commit into from

Conversation

alivenotions
Copy link
Collaborator

No description provided.

@mathiasberggren
Copy link
Owner

You're a star for making this work! 🚀🌟

@mathiasberggren mathiasberggren marked this pull request as ready for review April 10, 2023 18:32

// Dynamic viewports allow us to recreate just the viewport when the window is resized.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Niceee

);
// Destroying the `GpuFuture` blocks until the GPU is finished executing it. In order to avoid
// that, we store the submission of the previous frame here.
let mut previous_frame_end = Some(sync::now(device.clone()).boxed());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I follow, could you explain this to me like I'm 3, how does this allow us to execute the GPU code in a non-blocking way on line 354 compared to if we would not have this reference?

use vulkano::device::DeviceExtensions;

let device_extensions = DeviceExtensions {
// Swapchain is needed to present images to a surface. The `khr_swapchain` provides that.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could just draw on the surface directly while the swapchain gives us the opportunity to be 100% sure that all rendering finished before presenting?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just me trying to understand things, not any suggestion of how things should be done 😅

)
.unwrap();

let vs = vs::load(device.clone()).expect("failed to create shader module");
let fs = fs::load(device.clone()).expect("failed to create shader module");
let vs = vs::load(device.clone()).unwrap();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants