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

Add Minimal Offscreen Rendering Example #2451

Merged
merged 30 commits into from
Jan 11, 2024
Merged

Add Minimal Offscreen Rendering Example #2451

merged 30 commits into from
Jan 11, 2024

Conversation

0xcaff
Copy link
Contributor

@0xcaff 0xcaff commented Jan 9, 2024

Adds a minimal offscreen rendering example. I spent a few hours stuck on a bug adapting the triangle example before getting here. I hope this will help fill in the mental model of vulkan for future readers by providing a minimal starting point without the complexity of swapchains.

triangle

Changelog:

### Public dependency updates

### Breaking changes

### Additions

* Add an example for offscreen rendering

### Bugs fixed

Copy link
Contributor

@marc0246 marc0246 left a comment

Choose a reason for hiding this comment

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

I think you forgot to remove some of the comments from the triangle example. The idea is that only comments specific to the example are present, so these should be removed. It would also be best to very briefly comment how this example differs from the triangle example, for instance commenting the image and readback buffer. As much as a sentence will be enough.

examples/offscreen/main.rs Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
@0xcaff 0xcaff requested a review from marc0246 January 9, 2024 05:37
examples/offscreen/main.rs Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
@0xcaff 0xcaff requested a review from marc0246 January 9, 2024 16:37
Copy link
Contributor

@marc0246 marc0246 left a comment

Choose a reason for hiding this comment

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

LGTM, I just have some nits regarding formatting / English remaining.

examples/offscreen/Cargo.toml Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
examples/offscreen/main.rs Outdated Show resolved Hide resolved
@marc0246
Copy link
Contributor

Thank you for the work!

@marc0246 marc0246 merged commit 9b6e307 into vulkano-rs:master Jan 11, 2024
5 checks passed
@0xcaff 0xcaff deleted the examples/offscreen branch January 11, 2024 16:58
marc0246 added a commit that referenced this pull request Jan 15, 2024
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
* add offscreen example

* cleanup example

* more cleanup

* typo

* fix clippy

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* edits

* i'm loosing my marbles

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* formatting

* Update examples/offscreen/Cargo.toml

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* cargo fmt

* more correct description

* import

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

* Update examples/offscreen/main.rs

Co-authored-by: marc0246 <[email protected]>

---------

Co-authored-by: marc0246 <[email protected]>
hakolao pushed a commit to hakolao/vulkano that referenced this pull request Feb 20, 2024
marc0246 added a commit that referenced this pull request Mar 4, 2024
marc0246 added a commit that referenced this pull request Mar 4, 2024
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