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?
Not sure I understand what you want. Do you want a preview of what the image looks like, but smaller? If so, you can just load the image and display it into a smaller area using draw2DImage(). You might even be able to use the IGUIImage type to render the image also. You would create the texture with a simple call to driver->getTexture().
With your code you created empty texture. To change its pixels you would use lock() function which return pointer in to pixel data. You need to call unlock() at the end to apply changes:
// create empty texture
ITexture *txt = driver->addTexture(dimension2d<s32>(32,32), "texture", ECF_A8R8G8B8);
// get pointer
u32 *p = (u32*)txt->lock();
// set all pixels to red
SColor color(255,255,0,0);
for(u32 j=0; j<txt->getSize().Height; j++)
for(u32 i=0; i<txt->getSize().Width; i++)
{// you need some simple math to calculate position in simple array from
//2D coordinates
p[j * txt->getSize().Width + i] = color.color;
}
// set pixel 10,5 to green
u32 xpos = 10;
u32 ypos = 5;
color = SColor(255,0,255,0);
p[ypos * txt->getSize().Width + xpos] = color.color;
// apply changes
txt->unlock();
Another possibility is to create IImage from array using IVideoDriver::createImageFromData() function. Than create ITexture from IImage with one of IVideoDriver::addTexture() functions.