-
Notifications
You must be signed in to change notification settings - Fork 953
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
Add WGL context creation and OpenGL support #4248
Conversation
I added some more feature detection and driver workarounds. That makes pass tests for vger-rs. |
Is it possible to test this in CI? |
@teoxoy not yet. Unless we manage to set up gl-on-12 over warp, this will need to wait until we have a physical box with a real gpu running our windows tests. |
I am very happy to be wrong! GLon12 isn't terribly hard to set up, though definitely shouldn't be part of this PR. Will file a follow up with more information. |
I've changed the PR to use a dummy window instead of a memory device, as that makes OpenGL context creation work on Mesa and my Sandy Bridge laptop. |
0c74fc2
to
3956713
Compare
Pushed a commit that enables renderdoc with wgl. Outside of presentation being all black on nvidia, this is looking good. |
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.
This is super amazing stuff. Tested successfully on all of my devices!
Everything is fairly minor
Could you also add an "OpenGL" row to the "Supported Platforms" table in the readme (and remove the GLES3 Angle entry for windows)? |
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.
Stunning work! Thank you for getting this all through!
This adds WGL context creation and desktop OpenGL support to the
gles
backend. It's used instead ofEGL
on Windows. Only WGL requests desktop OpenGL contexts. The behavior ofEGL
is left unchanged.To enable construction of an OpenGL context without a surface, a memory device is used. Each surface gets their own OpenGL context which share object with the memory device OpenGL context. Rendering to surfaces happens indirectly via renderbuffers as framebuffers cannot be shared across OpenGL contexts.
Currently a lot of
gles
backend features are not enabled on desktop OpenGL.I've tested it with an HD 5870 using the examples and vello.
bunnymark
is plain blue.skybox
crashes in the driver.mipmap
is too white, Vsync locks to 30 fps instead of 60 fps on a 60 Hz display. These may be issues with the driver orgles
backend rather than this PR however.