Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upnannou v0.9 - Vulkan graphics, simpler event API and much more #240
Conversation
mitchmindtree
added some commits
Nov 29, 2018
This comment has been minimized.
This comment has been minimized.
|
Epic work dude! |
mitchmindtree
and others
added some commits
Dec 4, 2018
mitchmindtree
added some commits
Dec 14, 2018
mitchmindtree
added this to In progress
in v0.9
via automation
Jan 2, 2019
This comment has been minimized.
This comment has been minimized.
|
Awesome stuff!! |
mitchmindtree
referenced this pull request
Jan 15, 2019
Closed
Model/View relevance when drawing interactions between parts of the model #244
mitchmindtree
added some commits
Jan 26, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
mitchmindtree commentedJan 2, 2019
•
edited
This is easily the biggest update for nannou so far!
OpenGL -> Vulkan
The switch from OpenGL to Vulkan for cross-platform graphics is the main story here. You can find more details at #208 and #216, but the primary reasons for switching to Vulkan are:
Both High-level and Low-level Access
While the existing high-level graphics APIs should behave almost exactly the same (apart from smoother graphics and slightly better performance), this PR also allows for much lower level access to the graphics stack than was previously available. In other words, nannou now allows for fully custom graphics pipeline creation, access to each window's unique swapchain, custom vulkan instance creation, custom device selection and loads more. To demonstrate this low level access, @JoshuaBatty and I have started a new series of
vk_*.rsexamples in theexamples/vulkan/directory. These demonstrate how to work with basic geometry, images, 3D, first-person cameras, compute shaders and more. We'll continue adding to these over time - requests are very welcome!GLSL
Note that GLSL is still well supported so you can still reach into your existing bag of shader tricks! Note however that currently only the most recent versions of GLSL are supported, so you may need to update older versions. Funnily enough, this might make it easier to run GLSL 450 code on macOS as I believe support for more recent versions of OpenGL and GLSL from Apple have been lacking.
MacOS
For folks wondering about how macOS is supported, nannou uses vulkano under the hood which links to MoltenVK on macOS for translating Vulkan to Apple's Metal API. We're hoping that by the time this is merged, @freesig's work on automating the MoltenVK installation process at build time will have landed. In theory this means that you should be able to run
cargo buildlike normal and everything should Just Work™ (you might have to restart your terminal), though don't be surprised if there are hiccups as this is all still very new.Tradeoffs
All that said, this change will mean that nannou may no longer be compatible on some older systems that don't yet have Vulkan support. Nannou aims to foster the next generation of creative coding and with our small team's limited capacity this unfortunately means we must draw a line in the sand at some point. If you're curious about the level of support for Vulkan on your system's GPU you can search for it here to find detailed reports. If you're not sure what GPU you have or it's not listed in that database, the site will allow you to download the tool for generating your own report.
If nannou was working for you in 0.8 but stopped in 0.9 we would love for you to leave an issue and let us know. We'll do our best to address each issue, though keep in mind that our ability will be limited in cases where Vulkan driver support is lacking.
Simpler Event API
One glaring issue with nannou's current event API is the way that user's are expected to handle events via the
eventfunction. While the event type is thorough and allows for accessing loads of hardware, application and window events, handling theEventtype itself could be quite verbose and confronting for new users who might be unfamiliar with the fancy pattern matching required.This update allows for using functions to handle events in a way that will be much more familiar to users coming from Processing, OF and Cinder and reduces the amount of language-learning users have to go through before they can start being creative.
For a closer look at these changes check out #221 and in particular the changes to the examples in the diff. The new
all_functions.rsexample demonstrates all of the new event functions that may be registered with apps and windows in one place.For details on the other small tweaks, patches, fixes and features check out the CHANGELOG diff and the commit messages below.
Merging is currently pending: