[Bf-python] BGL docs

models at paposo.com models at paposo.com
Mon Oct 20 03:00:38 CEST 2003


Here's a rough draft of my attempt to document the BGL module.
There is a class in BGL called buffer. The class only has one funtion called
buffer.  I couldn't figure out why this is there, but I have an idea.  Alot
of the OpenGL commands require a void*  to put data into - a sort of empty
container. I was thinking that the purpose of the buffer was for handling
pointer type notation in python. So for example the OpenGL command
glReadPixels, which is part of the BGL module takes as it's last parameter a
pointer to void. If you were coding in C this isn't a big to-do but if you
want to use glReadPixels in a python script you'll need to have a buffer to
pass as the last parameter where the data will get stored. I think this is
what's going on here. I could be wrong though.
So you'd do a Blender.BGL.Buffer.Buffer(BGL.GL_BYTE, 1024,NULL) or something
like that and use this as the last parameter to glReadPixels.  I'll see if
this is really the case... maybe I just dreaming though.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: BGL.zip
Type: application/x-zip-compressed
Size: 12651 bytes
Desc: not available
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20031019/86380723/attachment.bin>


More information about the Bf-python mailing list