Important changes to OpenGLRaw

Jason Dagit <[email protected]> Thu, 25 Oct 2012 22:25:07 -0700
Newsgroups gmane.comp.lang.haskell.hopengl
Message-ID <CAJ-DSywGKTsLyQaO-hM5+MkLyWmsZr+Fhsb4yQSpStEWqAG_Kw@mail.gmail.com>
--===============7457050041462453190==
Content-Type: multipart/alternative; boundary=f46d043c8220f8117604ccef8abd

--f46d043c8220f8117604ccef8abd
Content-Type: text/plain; charset=ISO-8859-1

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

--f46d043c8220f8117604ccef8abd
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello,<div><br></div><div>At some point in the past, OpenGLRaw was converte=
d to use newtype wrappers for the GLfoo types, such as GLenum. I think this=
 makes a certain amount of sense. It&#39;s certainly makes type safety easi=
er. =A0There have also been significant downsides to this:</div>
<div><br></div><div>=A0 * The CPP macros to make these definitions are borr=
owed verbatim from GHC sources and required updates with new GHC releases i=
n order to stay compatible. Although, it hasn&#39;t been a problem yet, it&=
#39;s conceivable this will conflict with supporting different versions of =
GHC at some point.</div>
<div>=A0 * Optimization rules have to be written against these newtypes and=
 forgetting them can lead to significant performance=A0degradation=A0or ext=
ra verbosity for people using the bindings.</div><div>=A0 * You have to rea=
ch 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 mis=
sed opportunity for high performance code.</div>
<div><br></div><div>If you look at the current HEAD of the master branch fo=
r the OpenGLRaw code on github:=A0<a href=3D"https://github.com/haskell-ope=
ngl/OpenGLRaw">https://github.com/haskell-opengl/OpenGLRaw</a></div><div><b=
r>
</div><div>You will see some changes including:</div><div>=A0 * All of the =
newtypes mentioned above have been changed to type aliases</div><div>=A0 * =
Version bumped to 1.3.x</div><div>=A0 * TypesInternal module has gone away<=
/div>
<div><br></div><div>Thanks for these changes goes to Trevor Elliott.</div><=
div><br></div><div>If you think this move to type aliases is an error, plea=
se let me know (on list or personal email is fine).=A0I&#39;d like to do a =
push to Hackage sometime soon, but I want to give people a chance to commen=
t first. By this time next week, I would like to post a new release, unless=
 someone has an objection.</div>
<div><br></div><div>There is another wonderful set of changes you will find=
 in HEAD. I received patches from &quot;ozelis&quot; to add support for the=
 NVidia path rendering extension. Very cool!</div><div><br></div><div>Thank=
s!</div>
<div>Jason</div>

--f46d043c8220f8117604ccef8abd--


--===============7457050041462453190==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
HOpenGL mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/hopengl

--===============7457050041462453190==--