
Am Samstag, 23. Mai 2009 23:24:26 schrieb David Duke:
Does HOpenGL 2.2.3.0 have a binding for glGetBufferParameteriv, or at least an interface that provides the same functionality, in particular querying the size of a vertex buffer object? [...]
Yes, it has, because bufferData is a StateVar: http://hackage.haskell.org/packages/archive/OpenGL/2.2.3.0/doc/html/Graphics... Rendering-OpenGL-GL-BufferObjects.html#v%3AbufferData So you can use it like: ... (size, ptr, usage) <- get (bufferData ArrayBuffer) ... In general, I tried very hard to make everything a StateVar, so setting and getting state is very similar. For most state, OpenGL allows this. What is perhaps not so obvious is that sometimes a few state queries are combined on the Haskell side to keep the symmetry (as in our case above). I probably should have used something more descriptive than a triple here, and I admit being guilty of writing far too less documentation. But (documentation) patches are happily accepted... ;-) Cheers, S.