GLFW: Difference between revisions
No edit summary |
(update to GLFW 0.3) |
||
Line 7: | Line 7: | ||
== Status == | == Status == | ||
The library is being used by the [http://www.haskell.org/soe Haskell School of Expression (SOE)] code to render Graphics in a cross-platform manner. It currently interfaces with GLFW version 2.6, works on Windows, Linux (i386) and Mac OS X (both intel and ppc). | The library is being used by the [http://www.haskell.org/soe Haskell School of Expression (SOE)] code to render Graphics in a cross-platform manner. It currently interfaces with GLFW version 2.6, works on Windows, Linux (i386) and Mac OS X (both intel and ppc). | ||
GLFW itself is well documented, | GLFW itself is well documented (see [http://glfw.sourceforge.net GLFW website], and the Haskell module API is documented via Haddock. | ||
the Haskell module | |||
Not all functions are fully tested, and there are still a | Not all functions are fully tested, and there are still a | ||
few GLFW C functions missing from the Haskell module, namely | few GLFW C functions missing from the Haskell module, namely | ||
the image loading and | the image loading functions. They are excluded because image | ||
handling is a separate issue, and low level buffer manipulation | |||
would obscure their use further. Texture loading from TGA | |||
format is supported both from file and from memory (via a | |||
string buffer).. | |||
The Haskell module also provides basic text rendering while | The Haskell module also provides basic text rendering while | ||
Line 30: | Line 31: | ||
== Download == | == Download == | ||
Current version is [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/GLFW-0. | Current version is [http://hackage.haskell.org/cgi-bin/hackage-scripts/package/GLFW-0.3 GLFW-0.3]. It's a repackage to work with Cabal 1.2 or later. It now compiles GLFW C source code as part of the building process, please report to the package maintainer if you have build problems. |
Revision as of 22:46, 15 January 2008
About
This is a Haskell module for GLFW OpenGL framework. It provides an alternative to GLUT for OpenGL based Haskell programs.
Status
The library is being used by the Haskell School of Expression (SOE) code to render Graphics in a cross-platform manner. It currently interfaces with GLFW version 2.6, works on Windows, Linux (i386) and Mac OS X (both intel and ppc).
GLFW itself is well documented (see GLFW website, and the Haskell module API is documented via Haddock.
Not all functions are fully tested, and there are still a few GLFW C functions missing from the Haskell module, namely the image loading functions. They are excluded because image handling is a separate issue, and low level buffer manipulation would obscure their use further. Texture loading from TGA format is supported both from file and from memory (via a string buffer)..
The Haskell module also provides basic text rendering while GLFW doesn't. It comes from a free 8x16 font which is made into a TGA texture, stored as a Haskell string in the file GLFW.hs. Text rendering is only possible with Alpha enabled. Again, see SOE.hs from the SOE package for sample usage.
GLFW doesn't work well with GHC threads, forkIO or threadDelay. So avoid them if you can.
Download
Current version is GLFW-0.3. It's a repackage to work with Cabal 1.2 or later. It now compiles GLFW C source code as part of the building process, please report to the package maintainer if you have build problems.