Mark Wassell | 21 Jun 2008 14:14
Picon

Mouse and Keyboard events with OpenGL canvas.

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

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php

Gmane