-
-
Notifications
You must be signed in to change notification settings - Fork 90
GLContext integration #94
Comments
What would happen if we gave |
Pretty sure that should work, I can give it a try in a bit to confirm. That seems to be about half of what epoxy provides, the other half is autogenerated wrappers around OpenGL functions which load the required symbols at runtime lazily. This is pretty much exactly what gl-rs does AFAICT, so we don't necessarily care about that. Given that, not sure if it would make more sense to make bindings and add in a dependency to libepoxy or just use FFI to call the underlying glx/wgl/egl functions based on the target platform in the same manner epoxy and glutin does. |
I'd favor adding limited bindings over replicating I'm also unsure if |
It might be possible to look for the |
Looking into it now, one issue is that |
Regarding Diving into the gdk source it looks like they themselves already depend on |
I'm only aware of unstable std::dynamic_lib. FWIW, GTK relies on dlfcn-win32 to provide |
Pushed a PoC of the example from gtk-rs/examples#44 back to the same branch, now loading OpenGL function addresses from epoxy, relying on it being loaded already by gdk. Uses the This is not correct as it stands, as I'm pretty sure |
After researching it a bit, I think the best way forward is to use Wanted to get some thoughts on this before moving forward, but I'm thinking that the |
Oh wow, that's some sudden explosion of complexity :) If generating epoxy bindings is the way to go, that's outside the scope of
From what I can see there's nothing but magical side-effects to tie a particular Perhaps the best solution would be to ignore the whole |
Okay sure, crate is up and example is updated.
Yep, I agree with that assessment. Using the |
As an update, I've ported the simple example from the examples repo to use |
That's impressive progress :)
|
Thanks! Cool that's good to know, I will change I'm thinking that once the |
This will require patching
Still not sure but a separate crate is a good bet. |
Ok cool I will defer doing that for now then, let me know what you'd like to see going forward. |
A separate crate seems more flexible, we wouldn't need to track changes to |
Hey @mjkoo - sorry for digging up an old thread! Has there been any progress on this front? (another crate being spawned or something similar) I'd really like to use glium in some of my gtk apps. :-} |
Sorry I ended up going a different route for the project that I was working on and therefore didn't pursue this further, not sure what the glium + gtk story is today. |
What is the state of this? Wanted to render into Flutter which uses GTK, it gives me a GTKWindow and GdkGlContext. Works in C++ so should work in Rust |
There currently is no reliable way to use the
glium
/gl
crates together withGLContext
(andgtk::GLArea
), which a very limited API. Previous discussion is at gtk-rs/examples#44, let's continue it here.The text was updated successfully, but these errors were encountered: