-- This paint function gets the current glCanvas for knowing where to draw in.
-- It is possible to have multiple GL windows in your application.
paintGL :: GLCanvas a -> DC() -> WX.Rect -> [WX.Rect]-> IO ()
paintGL glWindow dc myrect _ = do
   myInit
   reshape $ convWG $ rectSize myrect
   display
   glCanvasSwapBuffers glWindow
   return ()
paintGL :: GLCanvas a -> DC() -> WX.Rect -> [WX.Rect]-> IO ()
paintGL glWindow dc myrect _ = do
   myInit
   reshape $ convWG $ rectSize myrect
   display
   glCanvasSwapBuffers glWindow
   return ()
paintGL glWindow dc myrect _ = do
   myInit
   reshape $ convWG $ rectSize myrect
   display
   glCanvasSwapBuffers glWindow
   return ()