chickadee » iup » call-with-glcanvas

(call-with-glcanvas [handle ihandle?] [proc (-> ihandle? any)] #:swap? [swap? any/c #f] #:sync? [sync? any/c #f]) -> anyprocedure

Calls the given procedure with the given OpenGL canvas handle and ensures that the OpenGL context of the canvas is active during the call. Returns whatever the given procedure returns.

If swap? is true, the double buffers of the OpenGL context are swapped before the call returns.

If sync? is true, the state of the windowing system and OpenGL is synchronized before entry into and after exit from the given procedure.