glGetBufferParameteriv

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? I haven't been able to locate something suitable through the index, but may be missing a combination. [By way of explanation, I'm currently running into a segmentation fault with a program that attempts to use a "large" vertex buffer object, ~500MB. Its likely the bufferData request exceeds resources, but I'm trying to confirm this, and the usual method seems to be calling glGetBufferParameteriv with GL_BUFFER_SIZE as an arg. If there is another way of checking vertex buffer allocation, that would also be useful to know ...]. thanks, David -- Dr. David Duke E: djd@comp.leeds.ac.uk School of Computing W: www.comp.leeds.ac.uk/djd/ University of Leeds T: +44 113 3436800 Leeds, LS2 9JT, U.K.

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.
participants (2)
-
David Duke
-
Sven Panne