fs2open.github.com
fs2open.github.com copied to clipboard
Splash screens broken on Mac
I haven't been seeing any splash screens that load before the intro video on Mac lately. Worked on 3.7.4, but not on nightlies for a while now.
To reproduce, just run with the MediaVPs on a Mac. You will see black until the video loads.
Confirmed that it reaches the calls to gr_bitmap for the title bitmap and title logo in freespace.cpp via adding some debug statements. But I don't end up seeing the bitmap.
Do you see a splash screen in windowed mode?
I have been exclusively testing in windowed mode so far, full screen might look a little obvious at work ;)
This broke somewhere in the gap of nightlies between July 14 and July 19, 2016. This is when we changed over to SDL2. Not sure a git bisect to narrow it down more would really be necessary at this point.
I can't seem to bisect as I am not sure the older code is compatible enough with the newest Xcode. I have to hack it to use a newer SDK and target OS, and then a newer compiler, and the code won't even compile at that point. It could very well be that those changes were made during this time and that is what broke the splash screen, but that would be hard to confirm.
Anyone have any insight into how SDL2 changes might have broken these for Macs? I can't do much more at this point without any better ideas what to look for.
The best place to start debugging this would obviously be the splash screen code (freespace.cpp:7687
). the gr_bitmap
call would be particularly interesting. From there there will be a call to gr_opengl_render_primitives_2d_immediate
which should eventually call glDrawArrays
from gropengldraw.cpp:2385
.
I don't know if there are OpenGL debuggers on Mac but if there is such a thing it would be a good idea to use that to check if the splash screen is sent to OpenGL and why it doesn't get rendered.
Doesn't look like it's an issue with drawing the actual splash after all. If I put a 15s sleep right after the gr_flip() to draw the splash to the screen, the image is drawn and stays there while it sleeps. Then, as soon as the sleep is over, the screen is washed black until the video starts playing. So it seems something is actually clearing the screen on Macs, not preventing the drawing in the first place. This normally happens so fast that the splash is never visible, just a period of black screen before the intro.
I think it is beyond me at this point to figure out what kind of graphics operations might clear the screen before the splash is ever shown. Anyone else have any ideas here? Seems to still be an issue.
As with Issue #1300 IMHO it should be moved to a new "Medium priority" category for "should fix at some point but not a release blocker" or maybe even "Low priority". Consider that
- this is purely a visual glitch AFAICT, no risk of crashes/hangs/data loss
- No one has commented on this issue in over three years, so not on anyone's radar screen
- AIUI Mac support is just generally broken at the moment (not really SCP's fault), and given this issue's low severity, fixing it wouldn't do much to change that, assuming the game is even runnable on Mac right now
If there's a push at some point to improve Mac support (if feasible) this could be a minor part of that.
Besides, does any active SCP coder have the expertise/tools/bandwidth to work on this?
Same as with #1300, This item was naively added to the Critical column simply because its a regression. Also as with #1300 this issue might not warrant release blocking. Still, it should be addressed SoonTM.
In agreement with jg18, gonna move this down to low because this is extremely minor. It's unfortunate, but it's not going anywhere unless someone with expertise and a Mac can take a look at it.
FWIW, splash screens have been working with FOTG and current master. I don't know if it's mod specific, because it's hard to get mods installed on this rig.
Ah FotG uses a scripted splash screen, which just overrides it and draws an image via scripting.
I've been unable to reproduce this in current builds. MVPS, as well as several other mods, all appear to show the splash screen just fine.
Just tested this again, now that both Mac nightly builds, and my own locally made builds, are running on my new M1 machine again. Splash screens worked in both cases, so I'd say we can close this as fixed.