-
Notifications
You must be signed in to change notification settings - Fork 0
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 support for GPU rendering #3
Comments
I'm slowly working through custom glutin initialization. So far I haven't encountered any major obstacles but it's going slowly and I guess we won't know if it's working until I hook up everything correctly all the way to some glium example. |
@mbernat let me know if you want me to test anything on real hardware. Probably one of the easiest ways to see if things are working is to use the Though once we have glutin contexts working, drawing a triangle with glium is very straightforward too. |
Thanks @bschwind , I'll let you know when I have anything testable. I've spent a lot of time just following glium/glutin types and didn't really get anywhere because I just don't know anything about GBM & EGL and I also started getting some IO errors from GBM operations (likely my fault, not HW). But I found a nice example in C [1] that seems to involve all the pieces in the right order. I'll try to get it working and then I'll port it to our codebase. [1] https://github.com/eyelash/tutorials/blob/master/drm-gbm.c |
I now have some awful code that can render one broken frame and immediately crash. Also, it only works with I will refactor it into a semi-reasonable PR and we can continue testing and building on that afterwards. |
Based on my investigation so far it should be easiest to support GPU rendering via
glium
+glutin
.Window
struct holding GBM context and implementHasRawWindowHandle
&HasRawDisplayHandle
for it.glutin
with ourWindow
. It should support GBM handles out of box.glium
should work with the glutin context.Other alternatives require (minor) forking to support GBM RawWindowHandle & RawDisplayHandle.
wgpu
: after forking it should work with our framebuffers directly, just like glutin does.winit
: after forking we could use its windows for full windowing functionality and provide windows to any compatible graphics API.The text was updated successfully, but these errors were encountered: