[Haskell-cafe] ANN (sorta): OpenGL with extra type safety

Don Stewart dons at galois.com
Mon Nov 10 15:56:15 EST 2008


wqeqweuqy:
> I recently modified the hOpenGL (and GLFW) source tree to force extra 
> type checking on its various IO actions using the 
> -XGeneralizedNewtypeDeriving extension (see 
> http://hackage.haskell.org/trac/ghc/ticket/736).
> 
> The main motivation was for writing concurrent OpenGL applications. Here 
> its important to know what functions contain OpenGL commands so they can 
> be directed to the proper threads (ones with active rendering contexts). 
> Plus it aids in partitioning work that can be offloaded or done 
> asynchronously.
> 
> The second motivation was to enforce static type checking on commands 
> that can only be executed in certain OpenGL contexts (sending vertex 
> data for example).
> 
> 
> As it is now, there are 3 new monads (their names will probably change):
> 
> OpenGLM: the basic opengl command
> PrimitiveM: commands that can only be issued between begin/end()
> class MonadGL: commands that can be issued in any GL context
> 
> 
> Now for the big question: Does anyone care? If so, should i make it a 
> new hackageDB package, or try to merge it into the official GL package.

Yes, make a new package. Put it on hackage. Don't waste work, when it
can be archived at the very least.

-- Don


More information about the Haskell-Cafe mailing list