Oscilloscope "burn" effect with openGL

Hi!
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