Is there a way to check if an event is going to trigger in advance? My 
startup procedure (GUI.Main) allows two event procedures to trigger, 
Render.Screen_Draw (SDL) and Network.UDP_Read (UDP socket). When 
Screen_Draw triggers I need to know if there are pending UDP packets so 
I can avoid rendering the frame until those pending network events are 
processed. The logic would look something like this:

Public Sub Screen_Draw()
   If [there is data in the socket] Then Return
   [render a complete frame]
End

Basically I need to give processing incoming UDP packets priority over 
rendering frames since processing the packets is quick but rendering a 
frame is slow. I only want it to render a frame when there are no 
incoming UDP packets needing attention. I've been thinking about logical 
ways to do this, but if there is some inherent GAMBAS way that would be 
more elegant.

-- 
Kevin Fishburne
Eight Virtues
www: http://sales.eightvirtues.com
e-mail: sa...@eightvirtues.com
phone: (770) 853-6271


------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Gambas-user mailing list
Gambas-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to