[HOpenGL] GLUT.MouseButton

Sven Panne Sven_Panne@BetaResearch.de
Wed, 08 Jan 2003 09:00:56 +0100


Glynn Clements wrote:
> [I'd be surprised if no-one else has encountered this yet, ...]

Well, almost...:    :-)

   http://cvs.haskell.org/cgi-bin/cvsweb.cgi/fptools/libraries/GLUT/Graphics/UI/GLUT/Callbacks/Window.hs.diff?r1=1.5&r2=1.6

The new GLUT binding (including extensive documentation) will be included
in the next HOpenGL release, which I *really* hope to get out of the door
soon. Apart from that, the GLU API will be much nicer, e.g. tessellation
basically looks like "polygon in, triangles/contours/primitives out",
without any need for silly callbacks.

While I'm at it: I really like to hear opinions and improvements of the
API, e.g. the vertex specification stuff like

   class Vertex a where
      vertex :: a -> IO ()

   data Vertex2 a = Vertex2 a a

   instance Vertex (Vertex2 GLshort) where   -- complex instance head!!!
      vertex (Vertex2 x y) = vertex2s x y

   %fun glVertex2s :: GLshort  -> GLshort -> IO ()

is not Haskell98. How can we do better, i.e. unify 1D/2D/3D/4D vertices
with differing component types in pure Haskell98?

Cheers,
   S.