draw and eras lines

hello,
Is it possible to draw a line then erase it?
I tried with glReadipixels, glDrawPixels, but it doesn’t work.
Thank you.

To erase something, let it be a line, a car, or anything, just redraw the entire scene but skip whatever you want to erase. Sure it’s possible to do it other ways, but this is probably the easiest.

The problem with erasing something is that the frame buffer is a 2D surface. If you remove a pixel, OpenGL doesn’t know what was behind.

Yes, of course.

Just stop drawing the line when you redraw the scene.

Originally posted by perdue:
hello,
Is it possible to draw a line then erase it?
I tried with glReadipixels, glDrawPixels, but it doesn’t work.
Thank you.

What you have to do if you don’t want to redraw the screen without the line is make a copy of the stuff behind the line before you draw it, then when you want it gone just copy that over the line. but i’m not sure how to do this in openGL.

Ctrl-C and Ctrl-V, right?

b