Oscilloscope "burn" effect with openGL

I’m having trouble implementing a burn effect for oscilloscopes (fading of plotted samples) without much success…

In normal OpenGL I can render the oscilloscope to a texture, sum it with the texture of a previous frame and display the result on a quad.

In JUCE this seems a little different and I can’t seem to figure out the right way…
I’m using an OpenGLContext in a OpenGLRenderer object and tried to capture the oscilloscope with a frameBuffer using makeCurrentRenderingTarget( ) and releaseAsRenderingTarget( ) with the opengl-code for the oscilloscope in between.

Displaying the texture of this buffer object reveals an empty texture…

Any pointers?

Have you tried decreasing the alpha value of the plot color over time (via the timer callback), and re-drawing the background and then the plot each time, so that each time it redraws the plot fades a little more? (Then, when alpha reaches 0, stop redrawing?)

[EDIT] Sorry, you edited your post while I was writing this. I don’t know anything about textures.

Thanks for the reply, I posted to early :stuck_out_tongue:

1 Like

I’m hoping to get a similar effect. I have an OpenGl scope working nicely. “Burn” effect would be awesome. @HowardAntares your approach is basically keeping a history of plot data and drawing each one with increased alpha. @ThijsM did you have any luck with your initial approach?