PDA

View Full Version : How to make an object move without moving the background picture



Wayne Linker
08-11-2002, 05:02 PM
Hi,
i'm only started learning how to use OPenGl recently. and i got this problem of moving an object without having the background picture being reload..

is there a way for just clearing the front object without clearing and loading the background picture again

Tresher
08-12-2002, 02:02 AM
I don`t think that you can just reload the front objects, because the pixel info of the background in the framebuffer is replaced by the fragments of the front objects.
I am surprised that you already have a background, taking into account that you just started with OpenGL. I think the only way to handle backgrounds reasonable is by using the texture memory and this involves texture mapping

nexusone
08-12-2002, 05:27 AM
Yes you have to redraw your screen every time you change something in the sceen.
But by reloading image you mean loading from disk or just redrawing it to the screen.

If you mean loading it from disk, you should load it and save it in memory, best way would be as a texture.

If you mean just redrawing it to the screen every time, yes you have to do that.



Originally posted by Wayne Linker:
Hi,
i'm only started learning how to use OPenGl recently. and i got this problem of moving an object without having the background picture being reload..

is there a way for just clearing the front object without clearing and loading the background picture again