nannou-org / nannou

A Creative Coding Framework for Rust.
https://nannou.cc/
6.05k stars 307 forks source link

Questions regarding nannou #813

Open Joe23232 opened 2 years ago

Joe23232 commented 2 years ago

Hey guys I have some questions regarding nannou:

  1. Is it retained or immediate graphics?
  2. What graphics renderer does it use? Is it openGL, vulkin, WGPU etc?
  3. Does it support Android?
  4. Is there 3D support? If not then is it in progress?
  5. Is there or will there be a GUI game editor (like Godot for example)?
  6. Is there ECS support (like Bevy)? If not does it have its own optimisations and parallelisation/multithreading etc?
mitchmindtree commented 2 years ago

Hey @Joe23232!

  1. Technically, you can opt for whatever direction you'd like on this as nannou allows for working with custom wgpu graphics pipelines to do whatever you wish. However, many of the higher-level examples and sketches use nannou's Draw API which has an immediate-mode like API, but with an implementation that is a bit of a hybrid. When using Draw, it collects a big list of commands which are only encoded onto a GPU command buffer upon a call to draw.to_frame, or one of the draw::Renderer methods for writing to a texture. Draw and the draw::Rendererare also designed to re-use resources where possible, like the CPU-side mesh in Draw or the graphics pipelines in draw::Renderer.
  2. Many years ago we started with OpenGL via glium, then moved onto Vulkan via vulkano, but for the past couple years have been using wgpu which has been by far the nicest experience, and I don't see us switching away from it any time soon.
  3. In theory I think this should be possible seeing as the lower-level cross-platform libs like winit and wgpu do (not sure about cpal used by nannou_audio), but neither @JoshuaBatty or I have used nannou for mobile yet and I personally don't recall anyone doing so. I'd imagine this might have become at least a little easier as of #812 as I think I remember there being some issues still when attempting to target Android with Vulkan.
  4. We have very little high-level tooling for working with 3D at the moment, but it's certainly possible. I think the wgpu/wgpu_teapot_camera.rs is probably the closest demo at the moment, though is rather verbose as it involves setting up a custom wgpu pipeline. @JoshuaBatty has a branch in the works that aims to add 3D camera support to Draw to make doing 3D stuff with Draw a lot easier which we plan to review together soon.
  5. No, nannou itself is not particularly aimed at game dev or focused on single-window apps (though someone could if they wished), but rather aimed at artworks and installations which can have a lot of crossover with games for sure. We do have tentative plans for a graph-oriented GUI based on gantz, but that will still involve a lot of work.
  6. My response from Matrix: We don't provide any out of box ECS tools or anything along those lines like bevy does, I think if you're after ECS with nannou the best bet would be to grab one of the many ECS libs out there and try driving it with nannou's events, but I imagine there might be a little boilerplate involved compared to having it built in like bevy.