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

Extensible rendering pipeline #85

Open
JeroMiya opened this Issue Dec 5, 2018 · 7 comments

Comments

Projects
None yet
8 participants
@JeroMiya

JeroMiya commented Dec 5, 2018

Motivation

Current WPF implementation relies on DirectX/etc... to render vector graphics/UI. There is potentially a desire to use alternative rendering APIs (SkiaSharp, et. al.) for specific purposes, primarily portability, but also for performance or integration in nontraditional environments (Unity/Unreal engine, Web/Wasm, embedded/IOT, et. al.).

Suggestion

As much as possible, refactor rendering pipeline and other platform-specifics to be extensible, allowing for custom implementations decoupled from DirectX/etc..., for example: a SkiaSharp backend instead of a DirectX one.

Potential Questions

Question: "Why not just use Xamarin.Forms? There's already a system there for custom renderers and cross-platform UI."
Answer: Xamarin.Forms implements something similar, allowing for platform specific or custom renderers for specific controls. However XF uses this to support platform native controls, whereas WPF would be more similar to Flutter/others in that it (more or less?) renders controls using graphics primitives or vector graphics from control templates and styles. There are pros and cons to each approach.

@rladuca rladuca added this to the Future milestone Dec 5, 2018

@karelz karelz removed the enhancement label Dec 5, 2018

@popcatalin81

This comment has been minimized.

popcatalin81 commented Dec 6, 2018

Skia is a 2D library (no biggie for most projects if 3D is not supported).

Ideally, there would also be a 3D supporting backend like OpenGL/Vulcan in addition to DirectX for more heavyweight applications which make use of 3D.

@legistek

This comment has been minimized.

legistek commented Dec 6, 2018

I think this is a great idea. I'm just wondering how it might fit in with this statement in the contributing guide:

We also do not intend to accept contributions that provide cross-platform implementations for Windows Forms or WPF.

I'm hoping someone from Microsoft could elaborate on that statement as it relates to something like this proposal.

@Atulin

This comment has been minimized.

Atulin commented Dec 7, 2018

We also do not intend to accept contributions that provide cross-platform implementations for Windows Forms or WPF.

As I understand it, anything that would make WPF usable on Linux/Mac/Android/etc. will be rejected. See #48

@Kryptos-FR

This comment has been minimized.

Kryptos-FR commented Dec 7, 2018

@Atulin I think the proposal here is not to make WPF cross-platform 9as in #48) but to make one part of it (the rendering) extensible. It will still have dependencies to Win32 APIs (and others), but at least it could allow some other scenarios as described in the first post.

For example if the rendering was done with Skia, I think you could make some kind of integration with other libraries also using Skia and share the same rendering space (especially important for layouting, Z-sorting, etc.).

@popcatalin81

This comment has been minimized.

popcatalin81 commented Dec 7, 2018

While there are no plans for WPF currently to become cross-platform, Still, I applaud this effort from WPF team, making the rendering pipeline extensible will make the cross-platform goal closer to being achievable sometime in the future.

@JeroMiya

This comment has been minimized.

JeroMiya commented Dec 7, 2018

I'm not part of the WPF team, just a user. And yes, as kryptos said, this proposal isn't specifically to make wpf cross platform or increase the scope, but rather just good architecture grooming to help facilitate other use cases and integrations within or near WPF's current scope.

@grokys

This comment has been minimized.

grokys commented Dec 10, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment