Instanced rendering using interleaved VBO - problem in advancing to next data set

Hi All,

I have created a transform feedback program which calculates new positions and copies positions into a seperate buffer “vboSTATE” , with which I plan to play the whole animation frames back late in a post-process manner.

I create the state VBO as follows:

        glGenVertexArrays(1, &vaoSTATE);
	glBindVertexArray(vaoSTATE);
	glGenBuffers(1, &vboSTATE);
	glBindBuffer(GL_ARRAY_BUFFER, vboSTATE);
	glBufferData(GL_ARRAY_BUFFER, (steps / outputInterval) * (2 * sizeof(PARTICLE_VERTEX)), NULL, GL_DYNAMIC_COPY);
	glEnableVertexAttribArray(15);
	glVertexAttribPointer(15, 3, GL_FLOAT, GL_FALSE, 0, (void*)(0));
	glVertexAttribDivisor(15, 1); // make attribute instanced...

Then I proceed and record the data from TF buffers as follows:

    glCopyBufferSubData(GL_TRANSFORM_FEEDBACK_BUFFER, GL_ARRAY_BUFFER, 0, writeOffset, sizeof(PARTICLE_VERTEX));

This is my rendering loop:

    glUseProgram(renderStateShader.ID);
    glBindVertexArray(vaoSTATE);
    glDrawArraysInstanced(GL_POINTS, 0, 1, particleCount);

My Vshader:

    #version 460 core
    precision mediump float;

    layout (location =15) in vec3 a_Pos;

    uniform mat4 projection;

    void main()
    { 	
	gl_Position = projection * vec4(a_Pos, 1.0);

    }

I currently have 2 GL_POINTS instances rendering as desired , in their correct starting positions - corresponding to index 0 and 1 in the array. However I would like to now get the same instances drawn at the new positions which sit at index 2 and 3 of the VBO array. I would then proceed and render them at positions saved at index 4 and 5 of the array and so on…to show the state as an animation. I would also have control over playback speed etc…

I hope you can help or shed some light on a better method / architecture to save calculated results for post-processing later. Thanks in advace.