nannou | A Creative Coding Framework for Rust | Code Editor library
kandi X-RAY | nannou Summary
kandi X-RAY | nannou Summary
An open-source creative-coding toolkit for Rust. nannou is a collection of code aimed at making it easy for artists to express themselves with simple, fast, reliable, portable code. Whether working on a 12-month installation or a 5 minute sketch, this framework aims to give artists easy access to the tools they need. The project was started out of a desire for a creative coding framework inspired by Processing, OpenFrameworks and Cinder, but for Rust. Named after this.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of nannou
nannou Key Features
nannou Examples and Code Snippets
Community Discussions
Trending Discussions on nannou
QUESTION
I got a library (nannou) which wants to call a function with signature fn(&'r nannou::App, nannou::Frame) -> nannou::Frame
.
I need to pass some additional value into this function (my image buffer).
My app looks like this:
...ANSWER
Answered 2019-May-04 at 15:20It seems like nannou
's API is just very restrictive. If it used the Fn*
traits in the callback type, you could use a closure and capture your extra argument. With the API being a function pointer, you're forced to using global state to pass the data in.
Here is another way of doing it. I'm assuming your data and function look like this:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install nannou
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page