GraphicsDevice.PlatformClear and GraphicsDevice.PlatformPresent are public when targeting OpenGL or Web but private when targeting DirectX. This can lead to errors when switching platforms or potentially cause a System.MethodAccessException when using assemblies built for a different platform.
Thanks for reporting this @bjornenalfa .... PlatformXXXX shouldn't be public at all on any platform. Those should all be internal/private APIs.
If someone gets a chance to fix this please submit a PR.
Alright, I've got a free minute or two. May as well take a stab.
The same fix is needed for GraphicsDevice.Web.cs
Additionally there's a public Mouse.PlatformSetCursor(...)
in Mouse.Default.cs and Mouse.Windows.cs
The web backend is just stubs, its not even getting compiled by the build bot, the real one lives in my fork.
@harry-cpp - Still the docs show any public APIs like that. So it would be good to fix it just to avoid it appearing in the docs.
Most helpful comment
Alright, I've got a free minute or two. May as well take a stab.