| Summary: | GL with SDL_SetWindowFullscreen wierd behavior | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Marco <marcopuzziello> |
| Component: | video | Assignee: | Ryan C. Gordon <icculus> |
| Status: | ASSIGNED --- | QA Contact: | Sam Lantinga <slouken> |
| Severity: | minor | ||
| Priority: | P2 | CC: | jopadan |
| Version: | 2.0.5 | ||
| Hardware: | x86_64 | ||
| OS: | Windows 10 | ||
| Attachments: | described in the comment | ||
Try the workaround at https://bugzilla.libsdl.org/show_bug.cgi?id=3524#c1 it seems to be a similar problem. |
Created attachment 2650 [details] described in the comment First I create a window with only (SDL_WINDOW_SHOWN | SDL_WINDOW_OPENGL) and create the GL context. After that i issue a few OpenGL commands (glViewport, glClearColor, ...) and enter the render loop. Inside the loop I first check for the F key press which toggles the fullscreen mode then continues to render the triangle and swap the buffers. Then i hit F once to enter fullscreen mode and heres the problem now: when i hit F again to leave fullscreen mode the OpenGL viewport will be displaced to the top left corner as if there was no title bar nor border. I will attach the same exact code I'm running with a Screenshot showing the window at startup and the window after the fullscreen toggling. I'm using Visual Studio 2015 Community.