| Summary: | OpenGL Context lost / broken on Macs (OS X 10.9 + GeForce) when Steam overlay appears | ||
|---|---|---|---|
| Product: | SDL | Reporter: | philhassey <phil> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | gabomdq, icculus, phil |
| Version: | 2.0.1 | ||
| Hardware: | x86 | ||
| OS: | Other | ||
|
Description
philhassey
2013-12-20 19:11:27 UTC
Hey Phil, can you send me two keys via e-mail so we can reproduce this? I've sent in those keys and I've created a branch on my Steam App "sdl2-bug-2320" that contains a version of my game with this issue. (Since I'm going live soon, I'm going to work on workarounds to reload all textures when I receive resize events, so future builds of Galcon Legends may not reproduce this issue.) Hey Phil, I tried that beta branch on Mac OS X 10.9 and I'm not seeing the issue here. Out of curiosity, how are you running OpenGL ES 1.1 code on Mac OS X? Do you have a simple repro-case application with source that I can drop in to test it out? Thanks! The bug is still present in the "default" branch after some experimenting today. I have disabled the sdl2-bug-2320 branch for now. The bug ONLY appears on GeForce cards. (Since I don't have one of these, I've been getting feedback from a few beta users to verify if I'm making any progress.) I have added in a hot-key "CTRL-R" that forces a SDL_GL_DeleteContext, SDL_GL_CreateContext and a reload of all textures. This makes it so when the problem happens people are able to reset things and continue playing. I'm not sure I can provide a simpler example since I can't reproduce the issue on my own computer, unfortunately. I do all my dev on OS X Mavericks Macs, but none of them have GeForce video cards. Thanks! -Phil To answer the OpenGL ES question: I'm just using normal OpenGL 1.x, just keeping to the subset that is the same as GLES. (I use maybe one or two #defines to handle slightly different function names.) So I'm not doing anything strange here. A stab in the dark...it seems rare that the context be lost. Did you try a:
SDL_GL_MakeCurrent(window, NULL);
SDL_GL_MakeCurrent(window, context);
as a workaround?
Phil, did this ever get resolved in some way? I have Macs with these GPUs, I think, if it still needs resolution. --ryan. This issue is still active for me. You can see it in Galcon 2: http://store.steampowered.com/app/294160 (free) Load it up, when the overlay appears, textures vanish, press CTRL-R to reload them. I'm using SDL Runtime Version: 2.0.1 because some other fullscreen issues were in newer versions of SDL 2 (but I think those were fixed in hg.) So I can't say for sure if it's still a problem or not. (This doesn't happen on my Mac, because I have a different video card.) Thanks! -Phil Adding to the triage list. Will try to reproduce. --ryan. Oh yeah, that's totally broken. I have to research this more, but it's possible the Steam Overlay is trampling some GL state and it has nothing to do with SDL. I'll push it through OpenGL Profiler and see what's happening. In the name of heroic measures, if you're using the Steamworks SDK, it fires a callback when the Overlay appears or vanishes, so you can just reload stuff when that happens as a workaround...but fixing the bug is a better idea. I'll report back. --ryan. Thanks for checking it out. I tried a bunch of workarounds a while ago, and decided it was easiest to tell people with the issue to press CTRL-R, which tells my game to force-reload all the textures. I did just look back in the Steam community thread I started ages ago, and it appears someone figured out some kind of workaround .. maybe. http://steamcommunity.com/groups/steamworks/discussions/12/666828127036283052/ Maybe someone can convince Steam to fix this if it is an issue on their end. -Phil (In reply to philhassey from comment #11) > Maybe someone can convince Steam to fix this if it is an issue on their end. This is on Valve's radar now. I'll leave the bug open for now, so I remember to check back on it. --ryan. Someone in the Steamworks Development community figured out how to work around this issue with the overlay: http://steamcommunity.com/groups/steamworks/discussions/12/618463446164757945/ So for SDL2 games, this means adding these lines to your project before calling SDL_GL_SwapBuffers(): glVertexPointer(4, GL_FLOAT, 0, 0); glColorPointer(4, GL_FLOAT, 0, 0); glTexCoordPointer(4, GL_FLOAT, 0, 0); I suppose this could be either added into SDL2, or fixed in the Steam client. -Phil This needs to be fixed on the Steam side of things, if it hasn't already been taken care of. |