vertexAttribPointer undefined?

I found this code in Graphics.Rendering.OpenGL.GL.VertexArrays in the OpenGL package, version 2.2.3.0: vertexAttribPointer :: AttribLocation -> StateVar (IntegerHandling, VertexArrayDescriptor a) vertexAttribPointer location = undefined makeStateVar (getVertexAttribPointer_ location) (setVertexAttribPointer location) Is that "undefined" intentional? When I remove "undefined", it works fine. - Conal

Am Dienstag, 14. Juli 2009 23:10:35 schrieb Conal Elliott:
I found this code in Graphics.Rendering.OpenGL.GL.VertexArrays in the OpenGL package, version 2.2.3.0:
vertexAttribPointer :: AttribLocation -> StateVar (IntegerHandling, VertexArrayDescriptor a) vertexAttribPointer location = undefined makeStateVar (getVertexAttribPointer_ location) (setVertexAttribPointer location)
Is that "undefined" intentional? When I remove "undefined", it works fine.
Ooops, embarrassing... The "undefined" is of course wrong, it's simply a remnant from the time when I designed that part of the API. Well spotted! I should really commit a Haskell version of e.g. http://freeglut.svn.sourceforge.net/viewvc/freeglut/trunk/freeglut/freeglut/... to test those relatively new parts of the code. I'm not completely happy with the Haskell API for specifying generic vertex attributes and their associated arrays, but that part of the underlying OpenGL C API is really a mess, too, and it would definitely look different if it was designed from scratch by the ARB. If somebody has a proposal to improve the Haskell API, I'd be happy to discuss it and change things. I'm planning to release a new version of the OpenGL package soon, which will contain the fix plus a few other things. Thanks for the bug report, S.
participants (2)
-
Conal Elliott
-
Sven Panne