[HOpenGL] Important changes to OpenGLRaw
Jason Dagit
dagitj at gmail.com
Fri Oct 26 22:11:52 CEST 2012
On Fri, Oct 26, 2012 at 1:02 PM, Dan Haraj <devharaj at gmail.com> wrote:
> I like this change. The issues you brought up have been relevant to me. A
> long while ago I had a severe performance bug because of coercions between
> GL float types and C float types that went away when I replaced them with
> unsafeCoercions.
>
Great.
>
> Glancing at the source for Raw, does this mean that include/CTypes.h is no
> longer required?
>
Good point. The easiest thing is to try removing it and see if anything
requires it. We're using travis-ci to build all the OpenGL packages now
which helps with this sort of testing.
Thanks,
Jason
>
> On Fri, Oct 26, 2012 at 1:25 AM, Jason Dagit <dagitj at gmail.com> wrote:
>
>> 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
>>
>> _______________________________________________
>> HOpenGL mailing list
>> HOpenGL at haskell.org
>> http://www.haskell.org/mailman/listinfo/hopengl
>>
>>
>
> _______________________________________________
> HOpenGL mailing list
> HOpenGL at haskell.org
> http://www.haskell.org/mailman/listinfo/hopengl
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/hopengl/attachments/20121026/02692b5e/attachment.htm>
More information about the HOpenGL
mailing list