Hi there,

I'm rendering a scene consisting of multiple VBO objects. I basically did the following in my callback function. But only the very last object in the list shows up. Am I missing something?

Any help will be greatly appreciated!!

Thanks,
D

class vboObjects:
     def __init__(arg):
           self.vertex_vboId
           self.normal_vboId
           self.index_vboId
           self.count 
           ....generate ids, register data into OpenGL
          
     def updatePositionsInScene():
          .....

def GLcallBack():
     update positions of all vbo objects
     for all vbo objects:
           glPushMatrix()
           glTranslatef(new position)

           glEnableClientState(GL_NORMAL_ARRAY);
           glEnableClientState(GL_VERTEX_ARRAY);
           glEnableClientState(GL_INDEX_ARRAY);
       
           glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbo.vertex_vboId);
           glVertexPointer( 3, GL_FLOAT, 0, None );

           glBindBufferARB(GL_ARRAY_BUFFER_ARB, vbo.normal_vboId);
           glNormalPointer(GL_FLOAT, 0,None);

           glBindBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB, vbo.index_vboId);
           glColorPointer(3,GL_FLOAT, 0, None);
          
           glDrawElements(GL_TRIANGLES, vbo.count, GL_UNSIGNED_SHORT, None);

           glDisableClientState(GL_VERTEX_ARRAY); 
           glDisableClientState(GL_NORMAL_ARRAY);
           glDisableClientState(GL_INDEX_ARRAY);
           glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
           glPopMatrix()

     glutSwapBuffers()
     return True