We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3525 - GL with SDL_SetWindowFullscreen wierd behavior
Summary: GL with SDL_SetWindowFullscreen wierd behavior
Status: ASSIGNED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.5
Hardware: x86_64 Windows 10
: P2 minor
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-17 23:31 UTC by Marco
Modified: 2019-06-21 19:45 UTC (History)
1 user (show)

See Also:


Attachments
described in the comment (127.22 KB, application/x-rar)
2016-12-17 23:31 UTC, Marco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marco 2016-12-17 23:31:35 UTC
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.
Comment 1 Jon Daniel 2019-06-21 19:45:44 UTC
Try the workaround at https://bugzilla.libsdl.org/show_bug.cgi?id=3524#c1 it seems to be a similar problem.