Drop support for DirectX 9 / OpenGL 2.0
PR Details
Description
This is my attempt to remove DirectX 9 / OpenGL 2.0 (called Level 9) from Stride and set Level 10 as default instead.
Motivation
This is change was inspired by @ykafia (check out his discussion here https://github.com/stride3d/stride/discussions/2185) and based on my personal knowledge.
Stride Engine primarly focus currently on supporting desktop and mobile platforms (but I heard isn't that good tbh), so it would be relevant to check out current state of graphics api distribution among players:
Android
Source: https://developer.android.com/about/dashboards/index.html
As we can see, more than 93% of devices support OpenGL 3.0 or later
Desktop
Since Steam platform is dominant, I think it is also reliable source
As can be observed, DirectX 9 marketshare is basically irrelevant ( almost 97 % of devices are supporting DX10 or later) Interestingly, Directx 12 alone supports about 90% of the all desktop computers.
Source: https://store.steampowered.com/hwsurvey
Types of changes
- [ ] Docs change / refactoring / dependency upgrade
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (fix or feature that would cause existing functionality to change)
Checklist
- [ ] My change requires a change to the documentation.
- [ ] I have added tests to cover my changes.
- [ ] All new and existing tests passed.
- [ ] I have built and run the editor to try this change out.
If this goes through we should consider changing the Android platform on the website to experimental or something.
There was an old discussion to get a basic working example of the android build but it hasn't consistantly worked for anyone (as seen in the Android Discord chat). The recommended graphics profile in that discussion is to use 2.1 since the others didnt seem to work at all.
We should probably make sure we have WebGPU native working as a replacement, wgpu-native has been widely tested to work well on android devices and it's using opengl ES and Vulkan under the hood
My two cents: The DefaultGraphicsProfile changes are fine but I think removing support entirely might be more appropriate for a bigger release (i.e., 4.3) instead of a minor 4.2.x update. It would be easier to communicate and projects that still need feature level 9.x or ES 2.0 can stay on 4.2.x without worry.
Overall it makes sense to streamline supported feature levels. Unity and Unreal dropped support for feature level 9.x about a decade ago, and I believe only the former still supports OpenGL ES 2.
IIRC, feature level 10/OpenGL ES 3.0 work on Android but the Silk implementation on mobile needs improvement. I think we can treat these as two separate and independent issues.