openframeworks/openFrameworks — pull request #2801 by ofTheo (2014-02-08 20:56:16+00:00)
Title: bugfix / feature - detects when an OF app has been launched as a Retina ...

Detects when an OF app has been launched as a Retina / Hidpi app and applies the pixel scale to all window related calls.

Currently, launching an OF app in Hidpi mode would result in a viewport 1/4 of the size of the window, drawn in the lower left of the window. This was due to the fact that ofAppGLFWWindow was returning screen level coordinates and not taking into account the pixel count.

( see: http://forum.openframeworks.cc/t/high-resolution-capable-osx-causes-really-small-window-inside-opengl-window/14566 )

This PR detects if an app is running in Hidpi mode and returns the correct coords / mouse positions and window sizes so the app can run and function in the expected way.

Via the window you can also query to see what the pixel to coord ratio is:
via ofAppGLFWWindow::getPixelScreenCoordScale();