-
-
Notifications
You must be signed in to change notification settings - Fork 809
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
WebGL render backend #520
WebGL render backend #520
Conversation
👍 on adding a separate |
I'd call |
I guess I don't follow what's different; wgpu would still need to use the tessellator, so there should be at least some common code. Currently it just spits out a mesh with a generic format, and it'd be up to the backend to transform that into its own format. If there are assumptions baked into |
Here's what it looks like at the moment (big WIP) in wgpu: https://github.com/Dinnerbone/ruffle/blob/5df7cafd4ea940d091a902224bae03e58090c024/desktop/src/render.rs#L520 The overall structure is the same, I agree, but the actual "what it's doing" will vary quite a lot. The structures it creates, the data it fills those with - those will be different. We can of course have yet another intermediate layer between what's actually sent and what that method generates, but I think that's extra cost for nothing. |
I don't think there is necessarily any extra work:
Ideally if we make improvements to the tessellator, all backends should benefit. For example, I know there are some issues with strokes being output in an incorrect order; if this is fixed, it'd be nice to just fix it in one place instead of having to futz about in each backend. Maybe this becomes less important because we may eventually remove |
I feel like a lot of that work should be done before it reaches this method, really. I started trying to pull that out when I worked on the drawing API; the intermediate stage represented here is the same as the output from that API. |
Clippy don't like this, apperantly. |
d6f18f4
to
2f6c479
Compare
Tweak common_tess to return a more generic gradient type.
Also ensure we clamp MSAA at maximum available, in case the sample count is not supported by the device.
This adds a WebGL1 rendering backend for use on web.
render
directory because backends may share common code and potentially work on multiple platformslyon
based tessellation code was moved torender/common_tess
and is used by both the desktop and WebGL backendscore
?)Needs general testing, and still some TODOs:
common_tess::tessellate_shape
return anIterator