refreshing the same data

Hello Everybody !

i have 2 problems and need help. im not a openGL programmer :frowning: but i need use openGL to efficiently display our analisis charts.
ive got it but have 2 perfomrace problems :

problem 1) how to refresh the charts on openGL view without render it again. i want to display on the same view some openGL text under mouse cursor and this is very very slowly because of refresh/render all from the begining when mouse move.

problem 2) similar i think. i want to scroll charts on X axis using scroll bar. and this is very very slow. im using glTranslate function on each charts. all of charts contain about few milions points. how to do that to be fast.

Thank You for help.

  1. you can render your frame into an FBO (, then display it, and draw text and so on over it.
    Render to the FBO only and only if the scene changes and not the text.

  2. I’m not sure about it, so I let other people to help on it.

very thanks !

ad 1. THANK it may help. im reading it.

ad 2. i think i shouldn’t use all chart points so i need use some aproximate function on chart and i agree i can do that but i want to use for it openGls techniques/standards appropriate for that problem.

  1. extending the render to FBO approach, you can draw on separate tiles, say if time is on the X axis, render all points for june on a FBO, attach that to texture1, all points for july to texture2, etc. Then draw these as textured quads while moving around the scroll, dynamically rendering may and april to texture3 and 4 as they become visible. You can maintain a pool of tiles (textures), so scrolling back and forth become very fast (like cached drawings).
    Unused ones will be recycled for new ones.

Some tutorials :

Details :

this is helpfull idea. and i should use this technique but for another purpose.

in the matter of scrolling i think my main problem is that the chart is very huge data vector and i should render only some of points which are really displayed. how to do that with openGl ? or i must do that on non-openGL application side ?