-
Notifications
You must be signed in to change notification settings - Fork 40
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
bloboats: Text (font? sprites?) not loaded #229
Comments
(I'm on Ubuntu 22.04, using what is presumably the Debian package for bloboats, but I can't vouch for what SDL satellite libraries I'm using...could be built from source or whatever Ubuntu provides.) |
OK, this is odd. With either 1.2.58-1 (from Debian) or 1.2.58 (locally built) or eba13ef (locally built), it is working fine for me with |
Ah, it reproduces on my laptop (using XWayland, not the Wayland backend), and not on my nvidia GPU (X11) desktop system. This is feeling like it's going to be an OpenGL bug in the game, but I'll look further real fast just in case. |
So this gets an SDL_VIDEOEXPOSE event on startup, deletes all its textures and rebuilds them. This is a bug in the game. When rebuilding them, it glDeleteTextures() the existing GL texture, generates a new one, and reuploads the texture data, but doesn't update the texture name with the new one from glGenTextures. This is a bug in the game. My guess (although I'm not at the desktop machine to verify) is that Nvidia's GL probably reuses texture names, so when you delete one, the next gen call reuses the same handle, causing this to work out by luck, but Mesa apparently just keeps incrementing the texture name. My other guess is that Wayland never sends an EXPOSE event, since it's compositor-based. I guess SDL 1.2 doesn't send an expose event during SDL_SetVideoMode() on x11? Worryingly, we send the 1.2 SDL_VIDEOEXPOSE event for both SDL_WINDOWEVENT_EXPOSED and SDL_WINDOWEVENT_SHOWN, which is surprisingly to me that neither triggers on Wayland, and that there might be some other game that we needed a SDL_VIDEOEXPOSE on startup to fix. I'll have to check. I'll see what 1.2 does here, though....maybe it doesn't send SDL_VIDEOEXPOSE on window creation. |
testsprite under sdl12-compat (these are the SDL2 events from
What testsprite sees from SDL_PollEvent, with sdl12-compat:
With classic SDL 1.2:
|
Hmm...real SDL 1.2 isn't sending expose events even when I cover the window fully with something else and uncover it again. I guess this is a side effect of modern X11 using a compositor, too. |
So when real 1.2 decides to send VIDEOEXPOSE events is complicated, with a tangle of various extensions even before you consider compositors, but one notable place is the literal X11 Expose event, where it only sends it along if SDL_SetVideoMode has completed, and I suspect that's probably what we should do here, too. |
Confirmed fixed as of 67f8b3a (1.2.58 + 29 commits) |
Prerequisites:
apt install bloboats
(Debian package version1.0.2+dfsg-4+b1
)libsdl1.2debian
version1.2.15+dfsg2-8
(real SDL 1.2)libsdl1.2-compat
version1.2.56-2
from Debianlibsdl1.2-compat
version 1.2.58 locally-built during Steam Runtime developmentlibsdl2-2.0-0
version2.24.0+dfsg-1
libsdl-image1.2
version1.2.12-13+b1
To reproduce:
bloboats
(using the real SDL 1.2)LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu/sdl12-compat bloboats
(using 1.2.56-2 from Debian)LD_LIBRARY_PATH
Expected result: in all three cases, the menu renders normally
Actual result: with real SDL 1.2 the menu renders normally. With sdl12-compat, either 1.2.56 or 1.2.58, the text in the menu is replaced by white rectangles.
(Actual gameplay not tested.)
The text was updated successfully, but these errors were encountered: