Thanks after a few try and error I was able to convert my code to use
I have anyway a question regarding VBO usage in general.
What is the effect of not unbinding a VBO buffer after drawing and
calling the drawing process again and again?
Le 07/16/10 20:48, Ian Mallett a écrit :
That was a complete example of how to use the
Here, I've added enough surrounding code to be self-explanatory.
import numpy as np
#Create a vertex buffer object
vertices = [ [0,0,0],[0,1,0],[1,0,0], [2,0,0],[0,3,0],[4,9,6],
Normal, and texture VBOs work very similarly. Vertex attribute VBOs
require you to specify a shader, but you'll only need those for things
like normal mapping, etc.
If you need more explanation, try: http://pyopengl.sourceforge.net/context/tutorials/shader_1.xhtml,
or Google: "from OpenGL.arrays import vbo". My implementation is here:
in glLib/glLibObjects.py (class glLibObject) but it's probably too
convoluted for a tutorial.