Updating buffer data frame by frame



  • I know i can generate custom geometry data in qt3d using QBufferDataGenerator. Is it feasible to do this on a frame-by-frame basis?

    Whenever i call do something like this:

    vertexBuffer->setDataGenerator(QSharedPointer<LineListVertexBufferFunctor>::create(*lines));
    

    the data is only updated the first time it is called. Is there any way to invalidate the current vertex buffer data so it updates itself with the new data?

    I want to make a particle system (CPU) which would require the vertex buffer data be updated each frame. How would I implement something like that?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.