From: Mark W. <mwa...@bi...> - 2008-06-22 10:57:41
|
Can anyone offer any guidance on how to register handlers for mouse and keyboard events with the OpenGL canvas. Registering handlers as I did with vanilla OpenGL: keyboardMouseCallback $= Just .... leads to a message "getCallbackID: no current window" and the program to terminate. I have tried canvas <- GtkGL.glDrawingAreaNew glconfig Gtk.onKeyPress canvas handleKeyEventGtk No error occurs but neither does any event handling. I have also tried to use the OpenGL style but wrap glDrawableGLBegin GLEnd GtkGL.glDrawableGLBegin glWin glContext keyboardMouseCallback $= Just .... GtkGL.glDrawableGLEnd glWin but still get the first call back error. This area doesn't seem to be covered by any of the sample programs or documentation that I have looked over. Cheers Mark |