#1569 closed defect (worksforme)
python3 opengl client
Reported by: | Antoine Martin | Owned by: | Antoine Martin |
---|---|---|---|
Priority: | major | Milestone: | 2.2 |
Component: | client | Version: | trunk |
Keywords: | Cc: |
Description (last modified by )
Attachments (2)
Change History (17)
comment:1 Changed 4 years ago by
Description: | modified (diff) |
---|---|
Status: | new → assigned |
Changed 3 years ago by
Attachment: | gtkglx.patch added |
---|
comment:2 Changed 3 years ago by
Just because GTK3 decided to break every existing GTK opengl application out there does not mean that it should be that way.
Preparatory work removing unneeded dependencies on GTK from the pure opengl code: r16915, r16916, r16917, r16919, r16920, r16921, r16925, r16926, r16927.
The patch above almost works - it paints the screen OK but then the next update comes and messes it up.. It works fine with mmap.
It probably needs xsync to prevent crashes too.
It should be moved to platform code, and the client init code will need to be re-worked.
The code could be made generic enough to be used with both GTK2 and GTK3: the context code only needs a window XID.
Support for win32 and macos should also be possible.
We may then also be able to query the real pixel depth supported on those platforms.
comment:3 Changed 3 years ago by
Support added for opengl with GTK3 in r16948 + r16949, only supported with X11 GLX for now.
It is now enabled by default with Python3 / GTK3.
The same backend can now also be used with GTK2 with X11:
xpra attach --opengl=native
Added bonus: we no longer depend on an unmaintained project.
Still TODO:
- blocker: the client crashes with
tray=yes
.. the way GTK has been sabotaging the system tray, I'm not sure we're to blame here - it doesn't work well at the best of times. It seems that simply enabling debugging (timing related?) can fix the crash, maybe we just need to xsync after running the gl_check? - verify high bit depth support, see #1309
- implement win32 and macos native contexts
comment:4 Changed 3 years ago by
Fixes and improvements:
- r16949: missed changes to config, man page and cosmetic fixes (+r16953, r16954)
- r16951: GLX improvements and cleanups (+r16958)
- r16952: if all the backends fail, just log a warning and continue without opengl
- r16955: win32 partial implementation (fixes in r16956, r16959, r16960)
- r16957: tell GLX to stop using the context on exit
TODO for win32 port:
- we cannot use the desktop window for running the sanity checks, so we may have to use a temporary (hidden?) window
present_fbo
fails at the point where we reset the target framebuffer, weird- packaging: #1574
As for macos, it's not very clear how we use opengl on an existing window:
- agl
- OpenGL Programming Guide for Mac
- Deep Image Display with OpenGL: 30-Bit Color is now supported..
- GLFullScreen
- Understanding and Detecting OpenGL Functionality
- packaging: #1575
comment:5 Changed 3 years ago by
As of r16993 (ugly workaround found here: How I can get DrawingArea window handle in Gtk3?), opengl works with the python3 builds on win32 (#1574). The present_fbo bug was fixed in r16964.
Still TODO:
comment:6 Changed 3 years ago by
comment:7 Changed 3 years ago by
Owner: | changed from Antoine Martin to J. Max Mena |
---|---|
Status: | assigned → new |
Ready for testing on Linux.
The python3 builds should now work with opengl enabled by default.
comment:9 Changed 3 years ago by
There was a bug with GTK3 on 64-bit MS Windows builds but it looks like a recent GTK update has fixed that too.
comment:10 Changed 3 years ago by
comment:11 Changed 3 years ago by
We don't use opengl on win32 if the window uses transparency, see ticket:1570#comment:4 and #1682.
comment:12 Changed 3 years ago by
I'll have to set up my mini test box here to use a display (good old Timmeh, he's configured to use packages not build from source) so I can give this a try.
comment:13 Changed 3 years ago by
Owner: | changed from J. Max Mena to Antoine Martin |
---|
NOTE:
Default install of python3-xpra
sets the shebang to /usr/bin/python2
.
Other than that, it seems to work fine for me - Fedora 26 and the 20171201r17551.fc26
python3-xpra-client
running against a trunk r17551 Fedora 26 server. With OpenGL enabled (Nvidia ION "GPU").
comment:14 Changed 3 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Default install of python3-xpra sets the shebang to /usr/bin/python2.
The default shebang belongs in the xpra-common
package, because we want to be able to install both python versions simultaneously.
Until the python3 version is made the default, this is how it is going to be. For running the python3 version, you are expected to run:
python3 /bin/xpra ...
comment:15 Changed 6 weeks ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/1569
poc using GLX to wrap the X11 window