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
Replace MiniTK.Graphics with custom OpenGL shim. #10288
Conversation
This may also fix #7622 (which was closed prematurely). |
I don't see any faster startup, but the more light weight dependencies are still very much appreciated. 👍 We should get rid of the unnecessary parts from SDL2-CS and OpenTK.OpenAL as well. |
6781405
to
72d5c07
Compare
Rebased. |
71fde9a
to
2d71ccf
Compare
Updated to drop the OpenRA.Constants enum. The constants are now defined on the class for consistency with OpenAL-CS, which will be introduced in the next pr. |
// ClearBufferMask | ||
public const int GL_COLOR_BUFFER_BIT = 0x4000; | ||
public const int GL_DEPTH_BUFFER_BIT = 0x0100; | ||
public const int GL_STENCIL_BUFFER_BIT = 0x0400; |
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.
Spurious whitespace after =
.
The code looks good to me and everything renders ingame. 👍 |
2d71ccf
to
397ca0f
Compare
Fixed. |
Merging with this comment from @reaperrr:
|
Replace MiniTK.Graphics with custom OpenGL shim.
This replaces the ~30k line monster that's hidden in our custom sdl2-cs.dll with a minimal shim that only exposes the functionality that we actually need and uses the proper c-style conventions. This removes the relatively long delay (at least on my machine) between window creation and first render, and gets us a step closer to being able to use the "official" sdl2-cs library.
Depends on #10249 which currently makes up the first 6 commits in this pr (don't review these here!).