Dear list,
I'm trying to get a simple sdlttf + lablgl example to work. The following code displays a blank window; what am I doing wrong?
cheers
--Jacques

let font_filename  = "test.ttf"
let font_size = 29
let _ = Sdl.init [`VIDEO]
let _ =   Sdlttf.init ()
let font = Sdlttf.open_font font_filename font_size
let screen = Sdlvideo.set_video_mode 400 400 [`OPENGL]


let pair_to_rect (a,b) =
  Sdlvideo.rect a b 100 100


let loop () =
      GlClear.color (0.0, 0.0, 0.0);
      GlClear.clear [`color];
      GlDraw.color (1.0, 1.0, 1.0);
      let text_surface =
    Sdlttf.render_text_blended font "hello world" ~fg:Sdlvideo.white
      in
    Sdlvideo.blit_surface 
      ~dst_rect:(pair_to_rect (100,100))
      ~src:text_surface
      ~dst:screen
      ()

let run () =
  while true do
    loop ();
    Sdlgl.swap_buffers ()
  done


let main () =
  at_exit Sdl.quit;
  at_exit Sdlttf.quit;
  run ()
   
let _ = main ()