Drawing a image in 3D space

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
radubolovan
Posts: 60
Joined: Tue Nov 13, 2007 7:03 pm
Location: Bucharest - Romania
Contact:

Drawing a image in 3D space

Post by radubolovan »

I have an image in memory, I mean I know width, height, type (eg. ECF_A8R8G8B8) and a pointer to bytes data.
How can I create a ITexture on the fly? (without write a png file to the disk and then driver->getTexture( "my_file" ) - I cand do that but it's not quite a cool option).
Thank you!
arras
Posts: 1622
Joined: Mon Apr 05, 2004 8:35 am
Location: Slovakia
Contact:

Post by arras »

IImage* IVideoDriver::createImageFromData(ECOLOR_FORMAT format, const core::dimension2d<s32> &size, void *data, bool ownForeignMemory=false, bool deleteMemory=true)

ITexture* IVideoDriver::addTexture (const c8 *name, IImage *image)
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

IImage* IVideoDevice::createImageFromData(ECOLOR_FORMAT format, const core::dimension2d<s32>& size, void *data,...);

ITexture * IVideoDevice::addTexture(const c8* name, IImage* image);

[UPDATE - damn yoooooooouuuuuuu! ;) ]
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
radubolovan
Posts: 60
Joined: Tue Nov 13, 2007 7:03 pm
Location: Bucharest - Romania
Contact:

Post by radubolovan »

Thank you very much! :)
I new about

Code: Select all

IImage* IVideoDevice::createImageFromData(ECOLOR_FORMAT format, const core::dimension2d<s32>& size, void *data,...);
And I thaught that

Code: Select all

ITexture * IVideoDevice::addTexture(const c8* name, IImage* image);
will load a texture from a file ... I should look at the code :wink:
radubolovan
Posts: 60
Joined: Tue Nov 13, 2007 7:03 pm
Location: Bucharest - Romania
Contact:

Post by radubolovan »

Now I have another "problem". How can I draw that texture in 3D space (not 2D, using IVideoDriver->draw2DImage( ... );
I want to draw it in an 3d quadrilateral.

//later
And of course scale, rotate.
Post Reply