Hi,
I need to access CImage in my external meshloader to build a texture of it. However, CImage is not in the Irrlicht include directory, but only in the internal sources. I can still compile it including the inner sources, and it does link on Linux. However, that should not be the way it is done? Moreover, I get linker errors on Windows.
Can someone please help me? I need either a way to access C Image on Windows or (I'd prefer that) an alternative to using CImage (without inheriting IImage myself).
Thanks,
Lo
Cannot access CImage in external meshloader
Yeah, I know what you mean, but I have the data as an array of pixels. Now, As you say it, I will have to write those into a file (where I'll need to give them a header and all that information), to then load them from this file again into an IImage*? This would cause a large loss in runtime: imagine creating one file for each of those 1500 lightmaps...
Anyways, if this is the case, which file format is the easiest to store an array of 16bit-pixels? TGA? BMP?
Anyways, if this is the case, which file format is the easiest to store an array of 16bit-pixels? TGA? BMP?
Check out IVideoDriver::createImageFromData. It does just what you want to do: creates an IImage from an array of pixels.