Skip to content

WIP#18

Open
alivenotions wants to merge 1 commit into
mainfrom
render-triangle
Open

WIP#18
alivenotions wants to merge 1 commit into
mainfrom
render-triangle

Conversation

@alivenotions

Copy link
Copy Markdown
Collaborator

No description provided.

@mathiasberggren

Copy link
Copy Markdown
Owner

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

@mathiasberggren mathiasberggren marked this pull request as ready for review April 10, 2023 18:32
Comment thread src/main.rs
.build(device.clone())
.unwrap();

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

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Niceee

Comment thread src/main.rs
);
// 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
Copy Markdown
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?

Comment thread src/main.rs
use vulkano::device::DeviceExtensions;

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

Copy link
Copy Markdown
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
Copy Markdown
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 😅

Comment thread src/main.rs

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
Copy Markdown
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