Difference: PortingFromGL4JavaToJOGL (2 vs. 3)

Revision 32006-01-10 - JamesSlack

Line: 1 to 1
 
META TOPICPARENT name="JamesSlackNotes"
Incomplete
Line: 13 to 13
  Tried to create an extension of AWTEvent to add in System event queue (Toolkit.getDefaultToolkit().getSystemEventQueue();), but event dispatch did not recognize the event (perhaps need to add some standard AWTEvent handling function?). For now, getting it to work with PaintEvent would be nice.
Added:
>
>
Adding a PaintEvent is messy, and can't capture the right events in the queue. New class IdleThread extends runnable, can be attached to the EventQueue as the idle event (happens after all events are processed, not sure if it resides after running, but easy enough to reattach it on incomplete scenes). Can't set idle event to null: EventQueue.invokeLater(idleThread). Perhaps setting invokeLater will enqueue an InvocationEvent?

Replace occurances of requestRedraw flag with a function call that checks for anything in the redraw queue, state machines are bad!

InvocationEvent added to EventQueue when thread (or runnable) is started

Redraw types:

  1. PaintEvent: includes window events that don't have explicit listeners
  2. InvocationEvent: thread startup, seems to be followed by PaintEvent s for components, threads, and frames in hierarchy. Must distinguish between invocations on idle thread/frames and the actual components.
  3. MouseEvent: nothing special, no extra code needed in mouse handlers, so far. Redraws as needed are called through requestRedraw
    • ignore mouse clicks, mouse releases
  4. KeyEvent: same as mouse handlers
    • ignore key releases
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback