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 - OpenGL: no way to get correct mouse position after window resize
Summary: OpenGL: no way to get correct mouse position after window resize
Status: RESOLVED INVALID
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.1
Hardware: x86_64 Windows 7
: P2 normal
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-09 09:57 UTC by igor
Modified: 2015-10-09 11:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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