| Summary: | picture "losing textures" on resizing | ||
|---|---|---|---|
| Product: | SDL | Reporter: | guinux <guinux7> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED INVALID | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | ||
| Version: | 1.2.11 | ||
| Hardware: | x86 | ||
| OS: | Windows (XP) | ||
| URL: | http://guinux.is.dreaming.org | ||
|
Description
guinux
2006-10-07 12:04:35 UTC
Likely the call to SDL_SetVideoMode() in response to the resize event is causing a new GL context to be created, which destroys all the textures. Has this ever been tested on Windows? Or is this just assumed to not work? --ryan. I am not familiar with OpenGL (but I have already used SDL), all I was doing is a port of PlanetPenguin Racer for Windows and noticed that bug which you don't have on Linux. What do you suggest trying? (Sorry to reply so late to this, it got lost on my TODO list...) This isn't an SDL bug...it's a shame that the Windows and Linux codepaths work differently, but calling SDL_SetVideoMode() destroys the Windows GL context, which destroys the textures. They need to be reuploaded. I'd probably wait until 1000 or so milliseconds have gone by since the last resize event (so it doesn't happen continuously), then reload all the textures. Arguably, SDL shouldn't require a SetVideoMode call to properly handle the resize event, but that's not going to change for 1.2 ... Sam might have a better plan for 1.3, though. --ryan. |