I'm using SFML2 and trying to update a texture subrect with an image subrect.
That way I keep a "dirty rectangle" and a cache of pixels (sf::Image) of the same size as the final texture and only update the necessary parts of the sf::Texture if needed.
(Sort of what sf::Sprite::SetPixel did on SFML1.6)
Now, I don't see a way of doing it with SFML2.
Shouldn't there be a method for what I'm asking?
Something like
sf::Texture::update(sf::Image &img, int imgX, int imgY, int txX, int txY, int width, int height);
or
sf::Texture::update(sf::Uint8 *imgPixels, int imgX, int imgY, int txX, int txY, int width, int height);
Am I missing a way?
Thanks!