How to copy textures into a texture ?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
khayyam
Posts: 7
Joined: Fri Mar 09, 2007 8:52 pm
Location: France

How to copy textures into a texture ?

Post by khayyam »

Hello everybody,

I'm trying to copy a texture into another texture. How should I proceed ?
I'm looking for something like

Code: Select all

video::ITexture *renderTexture(video::ITexture *target, video::ITexture *source, core::rect<int>& position);
I don't really understandthe difference between ITexture and IImage, so the solution may use IImage ...
vi-wer
Posts: 93
Joined: Sun May 20, 2007 7:15 pm
Location: Germany
Contact:

Post by vi-wer »

You can lock both textures and copy the data from one to the other. You can lock IImage too. So you can copy data from an IImage to an ITexture or vice versa. For more information take a look at the irrlicht API.

I'm not sure about the difference between IImage and ITexture, but I guess an IImage is the image data stored inside system memory while an ITexture is stored inside the vga memory and is resized if the image size is not supported by the vga card (a 320x240 texture will be resized to 512x512 by irrlicht).
Post Reply