Hi all,
I'm trying to create a texture in memory and apply it to some geometry. I'm actually using Irrlicht.NET CP but I've added wrappers for the createImageFromData() and addTexture() functions, which seem to be working. I posted some questions about that here:
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=21236
Now my problem is that when I call addTexure(), the process just hangs. Since I think the wrapper is okay, I'm guessing the problem lies in the native Irrlicht library. You can see the way I'm using it in that post I linked to. Does anyone have any thoughts about what could be going on? Am I using it correctly? Has anybody here even tried to use that stuff?
Thanks,
bigfish
createImageFromData() and addTexture()
Code: Select all
char test[256*256*3] ;
for(int i = 0; i < 256 * 256 * 3; i += 3)
{
test[i] = (char)0;
test[i + 1] = (char)0;
test[i + 2] = (char)255;
}
core::dimension2d<s32> ds = core::dimension2d<s32>(256, 256);
void * data = &test[0];
video::IImage * iim = driver->createImageFromData(irr::video::ECOLOR_FORMAT::ECF_R8G8B8,ds, data,false,false);
video::ITexture* images = driver->addTexture("demo",iim);
I tested R8G8B8 , A8R8G8B8
But I also get a crash with the NETCP wrapper.
Hopefully I find the reason why the wrapper does not work.
mamba
Code: Select all
Image iimg = driver.CreateImageFromFile("../../medias/rockwall.bmp");
Texture tex = driver.AddTexture("demo", iimg);
Here is one question concerning wrapping.
How is it possible to wrapp overloaded functions without
defining several different EXPORT names for each overloading function???
thanks
mamba