I am trying to write a module in python that would draw a multidimensional array of color data (rgb) for a screen. At the moment, I am using a 3-dimensional color array as follows:
numpy.ones((10,10,3),dtype=np.float32,order='F')
associating it with a buffer and using glVertexAttribArray to transfer data to an array of fragments (point sprites) (in this case, a 10x10 array), and this works fine for a static image.
But I want to be able to modify the data in the array and have a buffer reflecting this change, without having to rebuild it from scratch.
I have currently created a buffer using
glBufferData(GL_ARRAY_BUFFER, buffer_data.nbytes, buffer_data, GL_DYNAMIC_DRAW)
where buffer_data is a numpy array. What (if you like) could I pass instead (maybe some kind of memory pointer?)
user1483596
source share