-
Notifications
You must be signed in to change notification settings - Fork 419
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
Refactor DisplayHandle
into seperate android and linux properties
#6268
Conversation
The `DisplayHandle` is very different from the android surface handle.
In that case it should be annotated with |
[SupportedOSPlatform("android")] | ||
public virtual IntPtr SurfaceHandle => throw new PlatformNotSupportedException(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I hate that this exists but I see why. It's because the layering on this is kinda borked.
tl;dr: the graphics surface implementations live in base framework rather than the android project, so they can't directly reference something like AndroidGameActivity
to bypass this song-and-dance entirely and just call what they want to call directly where they need it.
I guess with the SupportedOSPlatform
attribute on this I could be okay with this but it feels a bit smelly nevertheless. There's probably a refactor in here that gets rid of it (likely by shipping the surface implementations off to the mobile projects - or at least the android one) but I'm not sure if worth.
@smoogipoo interested in your thoughts on layering here since this touches the veldrid parts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not worth overthinking this.
IAndroidGraphicsSurface.SurfaceHandle
instead of overloading DisplayHandle
DisplayHandle
into seperate android and linux properties
The
DisplayHandle
is specific to linux window magnagers and is very different from the android surface handle.I'm not sure if any of this code actually works / is useful, as android doesn't use veldrid yet.