Deleting an object

I was wondering is there any function that allows to delete an object that has been drawn on the screen. Say, I have drawn 5 cubes and wish to delete cube number 3. How can I do that? Is there a reverse “flush” function available?

Suf.

Clear the whole scene and redraw every cube but the one you want to erase.

Is it not possible to delete just the particular cube?

Suf

all gl has is a pixeliced image. like a photo. try to remove a person from a photo. shoot the photo again!

You could figure out where the cube ended up and draw a <insert background colour here> quad over the top of it.
If you want to delete something, remove it from your scenegraph and/or just don’t render it next frame.

-Mezz