[HOpenGL] Important changes to OpenGLRaw

Jason Dagit dagitj at gmail.com
Fri Oct 26 07:25:07 CEST 2012


Hello,

At some point in the past, OpenGLRaw was converted to use newtype wrappers
for the GLfoo types, such as GLenum. I think this makes a certain amount of
sense. It's certainly makes type safety easier.  There have also been
significant downsides to this:

  * The CPP macros to make these definitions are borrowed verbatim from GHC
sources and required updates with new GHC releases in order to stay
compatible. Although, it hasn't been a problem yet, it's conceivable this
will conflict with supporting different versions of GHC at some point.
  * Optimization rules have to be written against these newtypes and
forgetting them can lead to significant performance degradation or extra
verbosity for people using the bindings.
  * You have to reach pretty deep into GHC to make it possible for the
newtypes to work in the unboxed vectors provided by the vector package.
This is again, another missed opportunity for high performance code.

If you look at the current HEAD of the master branch for the OpenGLRaw code
on github: https://github.com/haskell-opengl/OpenGLRaw

You will see some changes including:
  * All of the newtypes mentioned above have been changed to type aliases
  * Version bumped to 1.3.x
  * TypesInternal module has gone away

Thanks for these changes goes to Trevor Elliott.

If you think this move to type aliases is an error, please let me know (on
list or personal email is fine). I'd like to do a push to Hackage sometime
soon, but I want to give people a chance to comment first. By this time
next week, I would like to post a new release, unless someone has an
objection.

There is another wonderful set of changes you will find in HEAD. I received
patches from "ozelis" to add support for the NVidia path rendering
extension. Very cool!

Thanks!
Jason
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/hopengl/attachments/20121025/d476afc5/attachment.htm>


More information about the HOpenGL mailing list