Fixes OpenGL by MaximilianEmel · Pull Request #2023 · stride3d/stride (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Fixes OpenGL #2023
Conversation10 Commits4 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
PR Details
Updates Stride.Graphics' OpenGL to match the new version of the API that's used in Silk.NET-2.17.1
Description
- SearchPathContainer is now an array
- Replaced specific enums with the generic GLEnum
Related Issue
Motivation and Context
When updating OpenXR to the latest version, Silk's OpenGL bindings also got updated, which updated the version of OpenGL, which had breaking changes.
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)
- 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.
The editor and a project also built with OpenGLES, but the game didn't launch. It is likely Stride is generally not setup to work with OpenGLES on Windows/Desktop, or my graphics driver doesn't support OpenGLES.
I believe there's still work to be done (some visible differences in the rendering between D3D11 and OpenGL), but I haven't checked if that's been introduced from the Silk upgrade, or was always like that. There's also quite a lot of Deprecated things, that while still continue to function, ideally should be updated at some point.
Results from testing against 83fdc04 (last working version of OpenGL on Windows):
- The rendering differences are the same.
- The same error still occurs apon launching the game with OpenGLES on Windows.
Conclusions:
- No rendering issues are originating as a result of the Silk.NET upgrade.
- OpenGLES still needs to be tested for its target platforms, though I believe it should work.
@@ -12,22 +12,22 @@ namespace Silk.NET.OpenGL |
---|
internal class GLCoreLibraryNameContainer : SearchPathContainer |
{ |
/// |
public override string Linux => "libGL.so.1"; |
public override string[] Linux => new[] { "libGL.so.1" }; |
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make those properties { get; } =
instead of =>
to avoid per call allocations of the array?
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look into this as soon as I can.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After I do an Android (OpenGLES) build test, it should be ready to merge.
I see that just as there was GLCoreLibraryNameContainer
there's also OpenGLESLibraryNameContainer
in Stride code base. Those were introduced by @xen2 in f982b42
I have been modifying both.