Reduce hardcoding by calculating the offset when dragging
Update the GL viewport when resizing the window