Hi.
Out of curiosity, is the last post-increment really needed in the code below?
void Image::setPixel(unsigned int x, unsigned int y, const Color& color)
{
Uint8* pixel = &m_pixels[(x + y * m_size.x) * 4];
*pixel++ = color.r;
*pixel++ = color.g;
*pixel++ = color.b;
*pixel++ = color.a; //this one
}
Please don't throw rocks at me, I know it has almost nothing to do with the optimization, but anyway...