[Haskell-cafe] Decoupling OpenAL/ALUT packages from OpenGL

David Duke djd at comp.leeds.ac.uk
Mon May 4 07:33:33 EDT 2009


Sven,

Decoupling basic primitives for geometric modelling from OpenGL would be 
useful.  For our work on data visualization  
(www.comp.leeds.ac.uk/funvis/) we introduced our own coordinate 
primitives for 2D and 3D (Coord2D and Coord3D), along with a simple 
typeclass for vector-like operations.  As with HOpenGL, the constructors 
are strict.   In addition to abstracting from spatial dimension, we were 
also thinking about different coordinate systems, e.g. polar, spherical, 
although we never developed this direction.
> Nevertheless, I'd be happy to see some proposals for a sensible, compact 
> vector math package. Probably we can fulfill most of the common use cases with 
> something simple.
>   
Even just data constructors and instances of these within Functor and 
Applicative are a useful starting point.   If you wanted a type class to 
support vector maths, most of the standard graphics texts have an annex 
on vector operations; if your aim is a compact set of operations 
sufficient for OpenGL/AL, these would seem a sensible starting point - 
happy to summarise the contents of the texts on my shelf, but I doubt 
the list is surprising.


regards,
David


-- 
Dr. David Duke                      E: djd at comp.leeds.ac.uk
School of Computing                 W: www.comp.leeds.ac.uk/djd/
University of Leeds                 T: +44 113 3436800
Leeds, LS2 9JT, U.K.



More information about the Haskell-Cafe mailing list