zturtleman / mm3d

Maverick Model 3D is a 3D model editor and animator for games.
https://clover.moe/mm3d
GNU General Public License v2.0
114 stars 22 forks source link

Viewports are transparent on Fedora 32 #135

Closed Kazade closed 3 years ago

Kazade commented 4 years ago

Firstly, thanks for continuing MM3D - I've been a big fan for a long time and only just discovered that you've continued the work!

I can't capture it in a screenshot (I've tried and it's attached) but on Fedora 32 / Wayland you can see through the application to whatever is running behind it! Nothing is rendered in the viewports at all.

This using 1.3.12 as included in the Fedora repository.

Screenshot from 2020-03-31 21-37-09

To clarify, you can't see the white viewports when running the application - you literally see right through the application to the desktop behind.

zturtleman commented 4 years ago

I can reproduce the issue on Debian 10 Gnome with Wayland. Using the Maverick opengl-update branch works correctly with Wayland though.

Seems like either Maverick is using the depreciated QGLWidget incorrectly or it might be a Qt bug. Errors from Maverick master branch:

user@host:~$ mm3d
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.

user@host:~$ QT_QPA_PLATFORM=wayland mm3d
Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QSocketNotifier: Can only be used with threads started with QThread
Using Wayland-EGL
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete, missing attachment.
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete, missing attachment.
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete attachment.
QOpenGLFramebufferObject: Framebuffer incomplete, missing attachment.
Using the 'xdg-shell-v6' shell integration

Thanks for reporting the issue.

m-7761 commented 4 years ago

What's the story behind branches after mm3d-1.3.7? Do those changes not appear here yet?

(Edited: Woops, my mistake, 1.3.7 looked like the MM3D version 1.7 but I realize it's different now. Still, are these not the "master" branch? I'll need to look through them for innovations if not.)

zturtleman commented 4 years ago

Please don't bring up unrelated discussion on bug reports.

The mm3d-1.3.8 etc branches are from the original Misfit Model 3D subversion repository. They had some fixes/improvements backported from trunk. The additional changes were released as 1.3.8a etc which superseded the original 1.3.8 release. From the Misfit Model 3D mailing list it might be possible to deduce which revisions were released as which versions in order to add git tags for specific versions but so far I have not.

m-7761 commented 4 years ago

Please don't bring up unrelated discussion on bug reports.

You brought it up:

Using the Maverick opengl-update branch works correctly with Wayland though.

In all serious, it's good to know.

zturtleman commented 4 years ago

I brought up a specific development branch that solves the issue reported. You brought up other branches simply because they exist. To me that is unrelated to transparent viewports and should be a separate question/discussion "issue".

zturtleman commented 4 years ago

@Kazade You might be able to workaround the issue by having mm3d use x11 instead of wayland. Try running QT_QPA_PLATFORM=xcb mm3d in a terminal.

The QOpenGLFramebufferObject warnings go away if makeCurrent(); adjustViewport(); is disabled in ModelViewport::viewChangeEvent(). It doesn't seem to be directly related to the issue.

Using wayland the window is completely unresponsive. Interrupting it in debugger shows it hangs in swapBuffers(). I might try to make a minimal test case to report to Qt.

#0  0x00007ffff6952819 in __GI___poll (fds=0x7fffffffbe20, nfds=1, timeout=-1)
    at ../sysdeps/unix/sysv/linux/poll.c:29
#1  0x00007ffff6e85739 in ?? () from /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#2  0x00007ffff6e8715c in wl_display_dispatch_queue ()
   from /usr/lib/x86_64-linux-gnu/libwayland-client.so.0
#3  0x00007ffff26233f3 in ?? () from /usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0
#4  0x00007ffff26118c6 in eglSwapBuffers () from /usr/lib/x86_64-linux-gnu/libEGL_mesa.so.0
#5  0x00007ffff37915d0 in QtWaylandClient::QWaylandGLContext::swapBuffers (
    this=0x555555d5d760, surface=<optimized out>)
    at ../../../../hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp:557
#6  0x00007ffff769dddb in QOpenGLContext::swapBuffers (this=0x555555dc2e80, 
    surface=<optimized out>) at kernel/qopenglcontext.cpp:1196
#7  0x0000555555875d35 in ModelViewport::paintGL (this=0x555555d2de50)
    at ../../../src/depui/modelviewport.cc:522

swapbuffers-backtrace.txt

zturtleman commented 3 years ago

I didn't ever get around to trying to make a test case to submit to Qt. I switched to QOpenGLWidget (#14) which solves the issue however.