MGL 2.0 Beta Working Notes

Functions affected and status

  • mglPrivateOpen: working.
  • mglPrivateClose: working.
  • mglGetMouse: working.
  • mglGetKeyEvent: working. nanosecond time stamps.
  • mglGetMouseEvent: working. nanosecond time stamps.
  • mglCharToKeycode: working. update wiki page.
  • mglKeycodeToChar: working.
  • mglPlaySound: working.
  • mglInstallSound: working.
  • mglPrivateDescribeDisplays: working except for gammaTableWidth/Length
  • mglPrivateSwitchDisplay: working.
  • mglPrivateMoveWindow: working.
  • mglMovie: working.

Bug list

  1. Resizing window It is more stable to open a cocoa window once and then keep hiding and showing that window. For now this means that you can't resize the display. The code that I wrote to do that seems to resize the window but not the openGLView.
  2. Screen Saver When the screen goes blank because of energy saver settings the open MGL window dumps to the debugger.

List of functions to be checked with Linux

Every function with os-specific code has been touched in the beta. Generally this has been done to mark where the os-specific code is, or to break-out an os-specific function so that it is better determined what the inputs/outputs of those functions need to be. In general, I think the goal should be to have mgl compile cleanly for all functions on both platforms (if something isn't implemented, it should just print out a message that it is not implemented). I have tried to structure the code so that this will be easy to do.

  • mglGetMouseEvent This has a new interface that allows getting all events and returning event information in array rather than structure form. This is implemented in the .m file so it should just work with the linux version, but it needs to be checked.
  • mglGetKeyEvent Same story as mglGetMouseEvent
  • mglPrivateOpen Broke-out an os-specific c-function. This no longer sets the resolution and refresh rate of the monitor. That is set by mglResolution (See below). So the code needs to be slightly modified to not do this. screenWidth and screenHeight are passed for opening windowed contexts.
  • mglResolution This sets/gets the resolution and refresh rate of the monitor. It should give the same functionality as your mglSetRandR but I didn't have that function in the repository so I couldn't use it as a base for this function. (Also, I think the name is a bit confusing for non X programmers – I initially thought it was a random number generator). Should be pretty straight forward for you to put the linux specific code into mglResolution though – I have written os-specific function calls that should be pretty straight-forward.
  • mglPrivateClose Broke-out an os-specific c-function.
  • mglSetGammaTable Broke-out an os-specific c-function.
  • mglGetGammaTable Broke-out a os-specific c-function.
  • mglCharToKeycode This now has an option to return all matching keycodes rather than just the first one encoutered (so that you can get the numbers on the keypad for instance). This needs to be implemented in the mex file.
  • mglKeycodeToChar Broke-out an os-specific c-function
  • mglMovie/mglPrivateMovie This should compile and return a message that it is not implemented.
  • mglText This I almost surely broke. The break-out c-function should return the bitmap text (which the linux code already did, so it should just be a small fix).
  • mglInstallSound Should compile and give not-implemented message.
  • mglPlaySound Should compile and give not-implemented message.