Drawing on top of video. How?


I was wondering if anybody could help me on this.
I need to draw lines on top of a video, but each time the draw() function is called, my previous lines are hidden under the video.
How can I do to make them stay always on top of the video?

I guest I will have to use textures, but I am new and I don’t know how to do it.
Any help?

thank you so much!

You can keep all the drawn lines in a vector, and draw them all, every time draw gets called:

in the .h
vector points;

iin the .cpp you can add points with:


and access them as an array:


or use an fbo:

Hi Arturo,

thank you very much for your response, it helped me a lot!.

This is the exercise I was trying to do: