If you are *really* sure that the runtime representation is the same
you could use usafeCoerce. You could use a small test function for
profiling, something like:

convertGLfloat :: GLfloat -> Float
convertGLFloat = realToFrac
-- convertGLFloat = unsafeCoerce

and toggle between the two (assuming you won't get a segmentation fault).

Another option is to not convert at all but use the GL types
everywhere. Either explicitly or by exploiting polymorphism.
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to