Page 1 of 1

Creating a custom image

Posted: Wed Dec 05, 2007 11:45 pm
by pippy
I have a large map of a custom class, and I want to make a 'map preview'.

So far I have

Code: Select all

void Map::createMapPreview(){
	char chmapPreview[20];
	mapPreview = driver->addTexture(core::dimension2d<s32> (256,256),
		chmapPreview, video::ECF_A1R5G5B5);

}
Which is a no-brainer, but how would I set the individual pixels?

I noticed Iimage has a setPixel() function, so would I convert the texture a Iimage, set the map preview, and convert it back, or is there another way?