moai/moai-dev — pull request #791 by atis-- (2013-10-04 12:32:53+00:00)
Title: GLUT host: store desktop (screen) size in MOAIEnvironment

It's very useful to know desktop (device, screen) resolution when creating your application window. According to this forum thread
http://getmoai.com/forums/get-screen-resolution-sdk-1-2-t894/
it's supposed to be stored as MOAIEnvironment.horizontal/verticalResolution. The GLUT host, however, presently stores the window size in there (after MOAISim.openWindow() call) which I think is incorrect and useless.

I've created this simple patch which uses glutGet() to fetch screen size as described here:
http://www.opengl.org/documentation/specs/glut/spec3/node70.html

Please review and include this!