[Haskell-cafe] Re: [Haskell] ANNOUNCE: OpenGL 2.3.0.0

Bertram Felgenhauer bertram.felgenhauer at googlemail.com
Sat Aug 1 09:31:07 EDT 2009


Rafael Gustavo da Cunha Pereira Pinto wrote:
> Sorry for all this annoyance, but I was starting to study those libraries
> (OpenGL, GLUT and GLFW) using Haskell and the update broke some of my code.
>
> Here is a patch that makes it compile, but then it breaks all code developed
> for GLFW-0.3, as all Floats need to be changed to CFloat.
> 
> --- GLFW-0.3/Graphics/UI/GLFW.hs	2008-01-15 20:23:18.000000000 -0200
> +++ GLFW.hs	2009-07-30 21:09:55.000000000 -0300
> @@ -517,11 +517,11 @@
>  _GLFW_INFINITY = 100000.0 :: Double
>  
>  -- Callback function type
> -type GLFWwindowsizefun = Int32 -> Int32 -> IO ()
> +type GLFWwindowsizefun = CInt -> CInt -> IO ()

[snip]

You should use the type aliases GLint, GLfloat, etc.

HTH,

Bertram


More information about the Haskell-Cafe mailing list