thanks for the fast reply,
Vertex positions: …and feed OpenGL offset positions in the positions vertex attribute array->
Its not practical for me because i am using a ringbuffer (in our example 2 seconds 48kHz = 96000 vertex2 values).
The ringbuffer consist several channels, the size can be bigger, constant offset addition could eat performance.
Also a offset/reset mechanism must be implemented :-(.
(the buffer will be filled continiouse with data for foreward and backward scrolling)
The MODELVIEW transform:
write out what your MODELING and VIEWING matrix translations are…
glMatrixMode(GL_MODELVIEW);
glViewport( viewport_ptr->left, //the size of the
viewport_ptr->bottom,//panel with gl context
viewport_ptr->right,
viewport_ptr->top);
//set current projection…
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
//adjust to the limits of the current ringbuffer state
// in our ecxample:
// left = 500, right = 502 - 1/48000
//parallel projection of 2 seconds of data after 500 sec.
gluOrtho2D( sensor_view_properties_ptr->limits.left,
sensor_view_properties_ptr->limits.right,
sensor_view_properties_ptr->limits.bottom,
sensor_view_properties_ptr->limits.top);
glPushMatrix();
//no affect to my problem
glTranslatef(0.0, chanel dependent offset,0.0);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer( 2, GL_DOUBLE, 0, pointer to ringbuffer);
glDrawArrays(GL_LINE_STRIP,
indecies of the the values from 500 to 502 sec (simplified)
);
glDisableClientState(GL_VERTEX_ARRAY);
glDisableClientState(GL_VERTEX_ARRAY);
glPopMatrix();
//------------------------------------------------------------------------
I also tried to mantain the cords for gluOrtho2D @ 0…2 sec,
translated the vecor with x-vaues 500-502 (-500)
same effect:-(
Does it seem that i can solve the problem without removing the timing information?