Module OsgViewer.Threaded_viewer


module Threaded_viewer: sig .. end
Viewer that run in separate thread (so you can use it from OCaml toplevel interpreter).

Remark that due to some subtle blocking the viewer usually doesn't appear immediately after create call. If you don't get viewer just send anything (including call) to OCaml toplevel and viewer window will appear.


type frame_handler = OsgViewer.Viewer.t -> unit 
frame_handler will be called after each frame

type t = {
   thread : Thread.t;
   channel : channel;
}
val create : unit -> t
val call : t -> (OsgViewer.Viewer.t -> 'a) -> 'a
Call specified function in viewer's thread and return result to caller's thread.
val set_frame_handler : t ->
frame_handler -> unit
val stop : t -> unit
val wait : t -> unit