bgl glVertexAttribPointer

All the stuff added to bgl is not in the documentation: https://www.blender.org/api/blender_python_api_2_77a_release/bgl.html

Are the offsets and stride for glVertexAttribPointer given as “number of floats” or “number of ints” (depending on the GL_[TYPE]) instead of number of bytes?

Second, the last param being the offset is just cast to a pointer in C (the value of the pointer is the offset). Do I just put the offset in a Buffer(GL_INT, 1) and the python wrapper will correctly read the value out of the buffer? If not… uh oh.

Seems the python wrapper for glVertexAttribPointer should just take an int offset instead of demanding a Buffer object.

Guess I’ll answer my own questions:

  1. No

  2. Uh oh!

Got around to looking at it in nsight this morning…
glVertexAttribPointer(0, 2, GL_FLOAT, FALSE, 9, 0x000000000805CAF8)

The python wrapper won’t allow anything but a Buffer object which means an incorrect value for the parameter is required.
TypeError: must be bgl.Buffer, not None

Even the deprecated glVertexPointer, etc. demand a Buffer object.

Looks like I’m SOL and still stuck in the early 90’s.