Guest User

Untitled

a guest
Jan 22nd, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. let _ = GMain.init ()
  2.  
  3. let windows = GWindow.window ()
  4.  
  5. let area = GlGtk.area [`DEPTH_SIZE 1; `RGBA; `DOUBLEBUFFER]
  6. ~width: 500 ~height: 500
  7. ~packing: windows#add ()
  8.  
  9. let renderMap () =
  10. GlClear.clear[`color;`depth];
  11. Gl.flush();
  12. Glut.swapBuffers()
  13.  
  14. let main () =
  15. area#make_current ();
  16. windows#show ();
  17. ignore(Glut.init Sys.argv);
  18. Glut.initDisplayMode ~alpha:true ~double_buffer:true ~depth:true ();
  19. Glut.setKeyRepeat ~mode:Glut.KEY_REPEAT_ON;
  20. GlClear.color(0.,0.,0.);
  21. Glut.displayFunc ~cb:(renderMap);
  22. area#swap_buffers ();
  23. Glut.mainLoop()
Add Comment
Please, Sign In to add comment