You are not logged in.
Pages: 1
Topic closed
Hello,here's the issue that I am running to...
I am trying to compile a code written in Ocaml..it's supposed to draw a triangle..but I am having a trouble compiling it..
Can anyone help?I am using Ubuntu 7.04..for further details
Here's the code
let _ =
ignore( Glut.init Sys.argv );
Glut.initDisplayMode ~double_buffer:true ();
ignore (Glut.createWindow ~title:"OpenGL Demo");
let angle t = 10. *. t *. t in
let render () =
GlClear.clear [ `color ];
GlMat.load_identity ();
GlMat.rotate ~angle: (angle (Sys.time ())) ~z:1. ();
GlDraw.begins `triangles;
List.iter GlDraw.vertex2 [-1., -1.; 0., 1.; 1., -1.];
GlDraw.ends ();
Glut.swapBuffers () in
GlMat.mode `modelview;
Glut.displayFunc ~cb:render;
Glut.idleFunc ~cb:(Some Glut.postRedisplay);
Glut.mainLoop ()
I posted this thread on the Ubuntu Forums..like an hour and half ago..
Here's the link to the thread if anyone wants to see it..it's pretty much the same though..
http://ubuntuforums.org/showthread.php?t=613833
Any help will be really appreciated :)
Never mind I got the answer :)
Pages: 1
Topic closed