SetPixel for 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
knightoflight
Posts: 199
Joined: Sun Aug 24, 2003 5:47 pm
Location: Germany

SetPixel for IImage ?

Post by knightoflight »

Hi,
if i would use the new addTerrainMesh the heightmap is an IImage.
But theres no SetPixel in IImage, so how can i change the height ?
Ok, if i lock the Image, i could point in the memory, but i dont really know how to do, can someone give us a SetPixel for Image, please ?
Guest

Post by Guest »

DWORD* pPixel = (DWORD*)texture->lock();

memcpy(pPixel, (DWORD*)bitsToSet, lenght);

texture->unlock();

where bitsToSet is the height map.
Post Reply