-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
Library doesn't work with Gtk under Wayland #1416
Comments
Interesting! Thank you for sharing. I see nothing wrong in your code. I'll try to reproduce locally to take a closer look and let you know. |
Thank you very much! |
I got that error only when setting the GLES api and required version above 3.3 with:
When setting only GL it never happened I can confirm it is using GLES, adding |
It's interesting that, as @Nokse22 already pointed out, the image from |
When using an external window type, libf3d does not handle the OpenGL surface so that's definitely a GTK issue. |
Also not working on X11 here :( |
Hopefully so I can also report it properly to GTK
I will create an issue on GTK
That's too bad, I am working on a flatpak, when it's done I'll send it
Of course! While testing I also made one with python and Qt f you want, it also only works in x11:
|
This example with Qt is working perfectly fine on my side (with X11). Thanks again for sharing, I'll also add it to the examples! |
More debuggingI have understood that the library uses GL and not GLES and the errors I got were because it was using GLES, forcing GL api on wayland fixes the errors, but it still doesn't render. Wayland uses EGL as a backend while x11 uses GXL and this seems to be the issue, in fact using EGL on x11 causes the same issue. Unfortunately you can't use GXL in Wayland. I still don't know if there is an issue in Gtk or something needs to be updated in the library to be able to use it in Wayland. Using Gtk debug I was able to get the errors that points to some specific API calls Errors
Here is a summary of all the different error messages:
|
I fixed it compiling all from source and adding Compiling it this way, though will cause it to not work with X11 with GXL so I had to force EGL on X11 too. Maybe there is a way to make it work both with EGL and GXL. |
Describe the bug
I tried to use libf3d with python and Gtk, but it doesn't render and it crashes
To Reproduce
Steps to reproduce the behavior:
Expected behavior
It should render correctly inside the Gtk.GLArea, if I render it outside it works.
System Information:
F3D Information
The version of f3d library is 2.4.0 installed with pip
Additional context
This code should show an application window with a button to open a 3d model file and a Gtk.GLArea where to render the 3d model.
Every time it renders it prints this:
And the result of
print(area.get_error())
at line 45 before crashing is:Segmentation fault (core dumped)
Otherwise is
None
I can correctly draw using OpenGL like this and it won't crash:
If I do this:
It will save an image of the same size of the Gtk.GLArea, but all black if no model is loaded or an image like the following one if a geometry is loaded.
With Gtk.GLArea I can set the allowed APIs with:
With only GL it will not crash and it will not print anything, with GLES it will.
The text was updated successfully, but these errors were encountered: