I’m using OpenGL to draw an oscillator (sound waves - like in Audacity) for a sound editing program. The oscillator window has a width of 1000 px, so I’m drawing 1000 lines here. Also, a tracker line moves over the oscillator lines as the sound plays, so the window has to update at least 30x per second. However, I don’t want to redraw all 1000 lines on every frame as it eats away too much CPU and seems completely unnecessary to me; only the tracker line needs to be redrawn all the time. How should I go about this?
I know it’s a very basic question, but I couldn’t figure this out after doing the tutorials.
Any help is welcome!