Just thinking aloud here. Could you do something like:
sf::Image image(bmpHeader.ImageWidth, bmpHeader.ImageHeight);
and then use
setPixel() to modify each pixel based on
pixel.
Maybe something like:
image.setPixel(sf::Color(pixel.r, pixel.g, pixel.b));
or equivalent, modifying to accommodate pointer usage.
Then, to create a texture, it's just:
sf::Texture texture;
if (!image.loadFromImage(image))
return errorCode;
The reason I suggest this method is because your pixels are stored in a different format (type Pixel) to how sfml seems to require (type sf::Color) and would need conversion.
Can you please tell me how sf::Uint8* works ?
sf::Uint8 is an 8-bit unsigned integer (actually it's an
unsigned char - a byte: 0-255)
EDIT: Corrected setPixel's link.