Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let _ = GMain.init ()
- let windows = GWindow.window ()
- let area = GlGtk.area [`DEPTH_SIZE 1; `RGBA; `DOUBLEBUFFER]
- ~width: 500 ~height: 500
- ~packing: windows#add ()
- let renderMap () =
- GlClear.clear[`color;`depth];
- Gl.flush();
- Glut.swapBuffers()
- let main () =
- area#make_current ();
- windows#show ();
- ignore(Glut.init Sys.argv);
- Glut.initDisplayMode ~alpha:true ~double_buffer:true ~depth:true ();
- Glut.setKeyRepeat ~mode:Glut.KEY_REPEAT_ON;
- GlClear.color(0.,0.,0.);
- Glut.displayFunc ~cb:(renderMap);
- area#swap_buffers ();
- Glut.mainLoop()
Add Comment
Please, Sign In to add comment