The fastest way of drawing an iimage?

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
dgrafix
Posts: 116
Joined: Sun Nov 18, 2007 2:36 pm

The fastest way of drawing an iimage?

Post by dgrafix »

How do i view an iimage on the screen?
C++/Irrlicht Noob pl3se B p4t1ent.
Visit www.d-grafix.com :)
Gianni
Posts: 48
Joined: Sat Mar 22, 2008 9:24 am

Post by Gianni »

so :D :D :

Code: Select all

IGUIEnvironment* env = device->getGUIEnvironment();
IGUIImage* img = env->addImage(driver->getTexture("image.jpg"),position2d<int>(0,0));
dgrafix
Posts: 116
Joined: Sun Nov 18, 2007 2:36 pm

Post by dgrafix »

Doesn't that still take its source from a texture? I want to be able to send an "IImage" type, modified image to the screen.
C++/Irrlicht Noob pl3se B p4t1ent.
Visit www.d-grafix.com :)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You cannot send an IImage to the screen, because data needs to be passed to the GPU before it can access the screen. And since ITexture is the struct which is used when an IImage was passed to the GPU, it's the only way to draw things to the screen. But of course you can also create a texture from an IImage, or lock the textures and change their contents.
Post Reply