From: Dirk R. <dre...@ia...> - 2004-10-21 15:23:23
|
Hi Daniele, On Thu, 2004-10-21 at 09:53, dan...@se... wrote: > Hi all, > I need to change image onto background any loop. How can I do this? What kind of > backgroud class I have to use? > My image is a vector of char (short int). there are two options ot get an image into the background: the ImageBackground or the TextureBackground. You can change the image on both of them every frame, which one is going to be faster depends on your system (I assume you want to have video in the background). For the ImageBackground you just have to change the data the Image uses, it will be redrawn every frame. The TextureBackground is very similar, just in addition to changing the Image you need to tell the TextureChunk that the Image has changed. If you have another way of drawing your image in the background (i.e. the video library already has some optimized OpenGL output), you can use a PassiveBackground to not disturb whatever is already there and just render over it. You do need to clear the Z-Buffer yourself for this one though. Hope it helps Dirk |