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!
Drawing a image in 3D space
-
- Posts: 60
- Joined: Tue Nov 13, 2007 7:03 pm
- Location: Bucharest - Romania
- Contact:
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
IImage* IVideoDevice::createImageFromData(ECOLOR_FORMAT format, const core::dimension2d<s32>& size, void *data,...);
ITexture * IVideoDevice::addTexture(const c8* name, IImage* image);
[UPDATE - damn yoooooooouuuuuuu! ]
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
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
- Posts: 60
- Joined: Tue Nov 13, 2007 7:03 pm
- Location: Bucharest - Romania
- Contact:
Thank you very much!
I new aboutAnd I thaught that will load a texture from a file ... I should look at the code
I new about
Code: Select all
IImage* IVideoDevice::createImageFromData(ECOLOR_FORMAT format, const core::dimension2d<s32>& size, void *data,...);
Code: Select all
ITexture * IVideoDevice::addTexture(const c8* name, IImage* image);
-
- Posts: 60
- Joined: Tue Nov 13, 2007 7:03 pm
- Location: Bucharest - Romania
- Contact: