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 3142

Summary: OpenGL: no way to get correct mouse position after window resize
Product: SDL Reporter: igor <mansonigor>
Component: *don't know*Assignee: Ryan C. Gordon <icculus>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.1   
Hardware: x86_64   
OS: Windows 7   

Description igor 2015-10-09 09:57:31 UTC
I'm using SDL_GLContext with resizable window, after resizing window, i catch window resize event and update rendering properties accordingly. But mouse position (taken from button click event) still is located in previous window frame. If using SDL_Renderer this can be fixed by calling SDL_RenderSetLogicalSize(), which will update mouse positioning, but looks like there is no way to do this for openGL context. Scaling mouse position in mouse event manually is not an option, because this is not required for SDL_Renderer, so it shouldn't be required for openGL
Comment 1 igor 2015-10-09 11:10:09 UTC
Coordinates are correct