CelticDaddio

10-18-2006, 07:27 AM

I have an object file which lists the vertices of my object(s).

I use VBO to download the vert data to the GPU.

I also have a dynamics file which lists the objects position and orientation at various timesteps.

Currently, I update the VBO by calling glMapBufferARB() and updating the vertex data. This seems to me to not be the best way to do this, but I am not sure of a better way, necessarily. Here is one idea I thought of...

1 - Use the dynamics info, pos and ori, which I'll call R(t) and O(t) to calculate the 4x4 3D transformation matrix, T(t), then store this data.

2 - Using GLSL, at each time step, pass T(t) to the vertex shader and use it to transform the current vertex's previous position to the new position.

Does this sound reasonable?

My problem is I am not sure of how to generate T(t).

Each position and orientation is absolute, not an offset from the previous position and orientation.

Any help is greatly appreciated.

Thanks,

CD

I use VBO to download the vert data to the GPU.

I also have a dynamics file which lists the objects position and orientation at various timesteps.

Currently, I update the VBO by calling glMapBufferARB() and updating the vertex data. This seems to me to not be the best way to do this, but I am not sure of a better way, necessarily. Here is one idea I thought of...

1 - Use the dynamics info, pos and ori, which I'll call R(t) and O(t) to calculate the 4x4 3D transformation matrix, T(t), then store this data.

2 - Using GLSL, at each time step, pass T(t) to the vertex shader and use it to transform the current vertex's previous position to the new position.

Does this sound reasonable?

My problem is I am not sure of how to generate T(t).

Each position and orientation is absolute, not an offset from the previous position and orientation.

Any help is greatly appreciated.

Thanks,

CD