Hi!

I've found a bug in gl binding.
The unmarshal function is wrong, because in this case there is no gl_TEXTURE0 offset.

            maxTextureUnit :: GettableStateVar TextureUnit
            maxTextureUnit =
               makeGettableStateVar (getEnum1 unmarshalTextureUnit GetMaxTextureUnits)

            unmarshalTextureUnit :: GLenum -> TextureUnit
            unmarshalTextureUnit x = TextureUnit (fromIntegral (x - gl_TEXTURE0))

Cheers,
Csaba Hruska