[Haskell-cafe] Opengl and Haskell GLdouble/GLfloat vs.
Double/Float
Jules Bean
jules at jellybean.co.uk
Fri Sep 28 17:34:17 EDT 2007
bbrown wrote:
> I am going to be doing a lot of opengl stuff in haskell and so far one thing
> has irked me. Why does haskell keep the GLFloat and GL types and not just
> the Haskell types.
It mirrors the C API in doing so.
I assume that this is because, in principle a system might exist where
the graphics card (and hence, openGL library) used different-precision
numbers to the CPU. Perhaps 32bit card on a 64bit machine gives you
32bit GLints even though you have 64 bit ints?
I don't know how often (if ever) this happens in practice.
Certainly GLfloat, GLdouble, GLint are members of all the type classes
you would hope them to be and they are no less convenient to use.
Jules
More information about the Haskell-Cafe
mailing list