[HOpenGL] Re: [Haskell] ANNOUNCE: OpenGLRaw 1.0.0.0
Isaac Dupree
ml at isaac.cedarswampstudios.org
Thu Jun 11 14:56:46 EDT 2009
Sven Panne wrote:
> As a first step to make the OpenGL package easier to install, more modular and
> a bit more flexible, a low-level binding for OpenGL has been uploaded to
> Hackage.
Reminds me of Mauricio's "bindings" efforts, though with some different
design decisions. Considering that OpenGL has many many functions that
may not be supported, in no linear pattern (EXT, or just binding to an
OpenGL 2.x implementation, etc.), dynamic loading might be a good
choice. Is it fast enough?
(Any amount of performance penalty is probably too much for OpenGL -- I
remember one time I resorted to some C in my OpenGL haskell program
because I couldn't figure out how to unbox enough things in my Haskell
code or maybe GHC 6.4 just wasn't as good as low-level
optimizations/code generation.)
-Isaac
> From OpenGLRaw's package description:
>
> ------------------------------------------------------------
> OpenGLRaw is a raw Haskell binding for the OpenGL 3.1 graphics system and lots
> of OpenGL extensions. It is basically a 1:1 mapping of OpenGL's C API,
> intended as a basis for a nicer interface. OpenGLRaw offers access to all
> necessary functions, tokens and types plus a general facility for loading
> extension entries. The module hierarchy closely mirrors the naming structure
> of the OpenGL extensions, making it easy to find the right module to import.
> All API entries are loaded dynamically, so no special C header files are
> needed for building this package. If an API entry is not found at runtime, a
> userError is thrown.
>
> OpenGL is the industry's most widely used and supported 2D and 3D graphics
> application programming interface (API), incorporating a broad set of
> rendering, texture mapping, special effects, and other powerful visualization
> functions. For more information about OpenGL and its various extensions,
> please see http://www.opengl.org/ and http://www.opengl.org/registry/.
> ------------------------------------------------------------
>
> Version 1.0.0.0 covers the OpenGL 3.1 core, all ARB extensions and all EXT
> extensions. Great care has been taken to introduce as few build dependencies
> as possible, so neither autoconf is required, nor any OpenGL headers. Future
> versions of the OpenGL package will basically be a convenience layer above
> this package, but you can always fall back to the raw binding if required. To
> get a taste for it, have a look at http://aedion.de/haskell/SmoothRaw.hs,
> which should look extremely familiar to anyone who has used OpenGL's C API.
>
> Any feedback is highly appreciated.
>
> Cheers,
> S.
>
> _______________________________________________
> Haskell mailing list
> Haskell at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell
>
More information about the HOpenGL
mailing list