Logo Search packages:      
Sourcecode: blender version File versions  Download package

BGL::Buffer Class Reference

List of all members.


Detailed Description

The Buffer object is simply a block of memory that is delineated and initialized by the
user. Many OpenGL functions return data to a C-style pointer, however, because this
is not possible in python the Buffer object can be used to this end. Wherever pointer
notation is used in the OpenGL functions the Buffer object can be used in it's BGL 
wrapper. In some instances the Buffer object will need to be initialized with the template 
parameter, while in other instances the user will want to create just a blank buffer 
which will be zeroed by default.

Example with Buffer::
  import Blender
  from Blender import BGL
  myByteBuffer = BGL.Buffer(BGL.GL_BYTE, [32,32])
  BGL.glGetPolygonStipple(myByteBuffer)
  print myByteBuffer.dimensions
  print myByteBuffer.list
  sliceBuffer = myByteBuffer[0:16]
  print sliceBuffer 

@ivar list: The contents of the Buffer.
@ivar dimensions: The size of the Buffer.

Definition at line 1731 of file BGL.py.


Public Member Functions

def __init__

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index