Open ben-cook opened 1 year ago
I like wgpu because:
But..
draw_rectangle()
. We either have to effectively build a rendering engine on top of wgpu or use something like https://github.com/nical/lyon/blob/master/examples/wgpu/src/main.rs which looks really promising. It provides the basics for drawing rectangles, circles, etc on top of wgpu. This could be what we need!
Currently we have implemented a toy rendering engine that can draw rectangles. A whole rendering engine is out of scope for this project, so we need to decide how to proceed. Here are some options:
Skia
Skia is an open source 2D graphics library which provides common APIs that work across a variety of hardware and software platforms. It serves as the graphics engine for Google Chrome and ChromeOS, Android, Flutter, and many other products.
Cairo
Cairo is a 2D graphics library with support for multiple output devices. Currently supported output targets include the X Window System (via both Xlib and XCB), Quartz, Win32, image buffers, PostScript, PDF, and SVG file output. Cairo is designed to produce consistent output on all output media while taking advantage of display hardware acceleration when available (eg. through the X Render Extension).
wgpu
wgpu is a cross-platform, safe, pure-rust graphics api. It runs natively on Vulkan, Metal, D3D12, D3D11, and OpenGLES; and on top of WebGPU on wasm. The api is based on the WebGPU standard. It serves as the core of the WebGPU integration in Firefox, Servo, and Deno.