GLUT Versions & Compatibility
Hello all. I've been trying to write a new widget toolkit for GLUT (I couldn't quite get MUI to work the way I needed - and MUI does not appear to be very extensible). My main coding machine runs Mac OSX Jaguar (10.2) and at work I use a Win2k Pro box.
I've noticed a couple annoying things about the various GLUT implementations, and perhaps someone out there can help me out.
1. I can't seem to find documentation for certain API features (even though I can figure them out) like glutKeyboardUpFunc(). This leads me to believe I do not have the latest glut specification manual, although I've not been able to locate a newer one. I have the Glut 3 API document (dated Nov 13 1996 - seems quite old!!!) in PDF format.
2. My Mac OS glut implementation has a function glutWMCloseFunc() that is used to have the window system issue a callback to the application before closing a GLUT window - great for things like popping up a "save before closing?" type of dialog. I hacked this into my Win32 implementation because it's very nice - but is there a standard in the API for this behavior? I would like to make it standard if it is not.
3. The Win32 implementation wants to quit the application (calls PostQuitMessage) whenever the GLUT window is closed via the [X] button in the window (or from the Window menu). I hacked this because, if I have more than one GLUT window open, I don't want the application to quit when the window is closed! I'd like to propose a change to the specification that says how this is supposed to work. (My hack will quit the app if there is no registered close callback, but registering a close callback will not quit the application). The MacOSX implementation does not quit the application when a window is closed.
3. The behavior generating the glutEntryFunc() callback is inconsistent between MacOS and Win32 implementations. In Win32, the callback is called when the GLUT window in question receives WM_GETFOCUS or WM_LOSEFOCUS (i.e., the window is active and the mouse is clicked outside or vice-versa). On MacOSX, and from the description in the API spec, the callback is called whenever the mouse cursor passes into or out of the client area of the GLUT window. I'm unable to determine (since I'm at work) what, if any, callback is generated when the focus of the MacOS GLUT window is lost or gained. Again, what is the true specification for this?
My main line of questions here is, since GLUT is supposed to be a window-system independent API, how is this ensured? The implementations of GLUT I have obtained seem to be system dependent on quite a few important functional points.
I appreciate any comments / feedback / pointers.
I'll also let you know when I've finished my widget API... let me know if the acronym 'VUI' (Visual User Interface) is taken, to your knowledge, as well. I'm also still trying to come up with a good branding for the toolkit...