Open HuguesDelorme opened 2 years ago
@grexe Is there any OpenGL error prompted in the terminal when running Mayo ? Can you please post here Mayo's console output on your machine ?
As a workaround you can comment the if()
block between lines 350-363 in src/app/main.cpp
: https://github.com/fougue/mayo/blob/e41d872be90744e9c8efd890e163f09f1d7c8c01/src/app/main.cpp#L350
Build and run again
This is the output I get (using MacOS 12.6 (21G115)):
gregor@Gregors-MacBook-Pro mayo.app % ./Contents/MacOS/mayo
DEBUG: OpenCascade settings file doesn't exist or is not readable [path=opencascade.conf]
INFO: OpenGL v2.1
WARNING: Back buffer dpr of 2 doesn't match <_NSViewBackingLayer: 0x60000170cb40> contents scale of 1 - updating layer to match.
WARNING: Back buffer dpr of 2 doesn't match <_NSViewBackingLayer: 0x60000170c270> contents scale of 1 - updating layer to match.
WARNING: Back buffer dpr of 2 doesn't match <_NSViewBackingLayer: 0x60000171a820> contents scale of 1 - updating layer to match.
WARNING: Back buffer dpr of 2 doesn't match <_NSViewBackingLayer: 0x600001718120> contents scale of 1 - updating layer to match.
will try the code change later.
Hello @HuguesDelorme & @grexe
I was experiencing this same issue on MacOS 13.0.1 (22A400), I followed your advice to comment out the block in main.cpp under the comment "// Use QOpenGLWidget if possible"
All is working fine now. Looking good.
@HuguesDelorme comment fixed it, on OS X Big Sur. Thanks!
@zambetti and @grexe Please try new option Force OpenGL fallback widget to tweak OpenGL support.
@HuguesDelorme I have just downloaded and built the latest version, and I can confirm the fallback widget works on my machine. Compliments on this nice application.
Hi!
I had the same issue with the black screen. I tried the fallback widget option (i.e. I turned it off and restarted mayo
), but that did not work for me. Commenting out the whole block in src/app/main.cpp
, i.e.:
#if OCC_VERSION_HEX >= 0x070600
...
#endif
(roughly lines 392-408) fixed my problem. Now, I can see the model.
I am on Ventura 13.1, Apple M1 chip, built mayo
against Qt 6.2.4 (IDK if that matters).
@andrsd The "fallback widget" option should be set to ON. Please check again with that option turned ON(and without the comment of course) Let me know your feedback!
The fallback widget was originally ON. I believe that's the default (?). That's when I had the issue with black screen, so I went to look for the cause and found this issue. I can try again. I forgot to mention I built the this version: c85fe27fbfa27ba9b163b01bb54036473fa31e4f
I tried a clean build of c85fe27fbfa27ba9b163b01bb54036473fa31e4f, made sure the Fallback widget
was ON
and all works as expected. Hmmm... 🤔
@andrsd
I confirm the forceOpenGlFallbackWidget
option is set to ON for macOS by default.
https://github.com/fougue/mayo/blob/c85fe27fbfa27ba9b163b01bb54036473fa31e4f/src/app/app_module_properties.cpp#L87
I don't like this option, it's preferrable to fix the OpenGL framebuffer rendering with Qt for macOS But until this gets fixed, seem like for macOS this workaround is required.
This is a pure guess and I might be totally wrong, but could it be that because MainWindow
is created before appModule->settings()->resetAll();
is called, then on a clean machine (i.e. machine where mayo was never run before) for the first time the setting is not applied which would cause the black screen?
@andrsd
You might have spotted a potential issue, I need to check this.
The forceOpenGlFallbackWidget
setting is explicitly loaded here:
https://github.com/fougue/mayo/blob/925403f13a3c5f6642c4f3812000ea4b8551514c/src/app/main.cpp#L394
But for some reason this could fail on the very first execution of Mayo
Reported by @grexe in issue #151
Notice that some other user(@livigni) mentionned Mayo to run correctly on macOS(see https://github.com/fougue/mayo/issues/67#issuecomment-1137480691)