[HOpenGL] generating a 2d maze in HOpenGL/Postscript

Claus Reinke claus.reinke at talk21.com
Fri Apr 1 08:30:29 EST 2005


Not sure how useful this is, but I often wondered what everyone
else is doing with HOpenGL, and one can never have enough 
examples. This one is translated from someone else's OCaml 
program (see comments for original c.l.f thread).

Tranlation was mostly straightforward. One hitch was the use
of End/Begin style for LineStrip in the OCaml version - we have
renderPrimitive instead, which keeps us from making errors in
Begin/End bracketing. But what about programs that rely on
fiddling with the bracketing (not that that is recommended)? 

Here I got round the issue by using edgeFlag, but what about
a general solution? I saw primitiveRestart in GL.BeginEnd, but
there's no explanation of what it does, and it isn't supported
on my platform anyway.

Enjoy,
Claus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Maze.hs
Type: application/octet-stream
Size: 5096 bytes
Desc: not available
Url : http://www.haskell.org//pipermail/hopengl/attachments/20050401/d01044d2/Maze.obj


More information about the HOpenGL mailing list