Doing a bit of after-work hacking on the PyOpenGL presentation, just realized that glInterleavedArrays is deprecated. It's pretty trivial to rewrite as array pointers when you have VBO objects:
glInterleavedArrays( GL_T2F_N3F_V3F, 0, data )
glEnable( GL_VERTEX_ARRAY )
glEnable( GL_NORMAL_ARRAY )
glEnable( GL_TEXTURE_COORD_ARRAY )
glVertexPointer( len(data), GL_FLOAT, 32, data+20 )
glNormalPointer( len(data), GL_FLOAT, 32, data+8 )
glTexCoordPointer( len(data), GL_FLOAT, 32, data )
of course, glVertexPointer, glNormalPointer and glTexCoordPointer are *also* deprecated, but as a first step toward using glVertexAttribPointer this should move people forward who've used glInterleavedArrays from PyOpenGL.
With glVertexAttribPointer you'd map each of the offset VBO values into a different shader attribute value (uniform/variable/whatever) that you would then access from your shader.
Pingbacks are closed.