1
Graphics / Re: Porting from CImg - Vertcal axis now inverted
« on: October 09, 2018, 06:42:50 pm »
It's not a bug (and the bug you linked to only happened after copying a texture and is already fixed in 2.4.2). You have to call "renderTexture.display();" after drawing to the render texture (https://www.sfml-dev.org/documentation/2.5.0/classsf_1_1RenderTexture.php#af92886d5faef3916caff9fa9ab32c555).
Many thanks for this, texus - it works nicely now, and I no longer feel like I'm misusing SFML.
It felt silly to perform the same sequence of copies again to flip back.
As well as similar items to the bug I linked to, it added to my confusion that I saw m_pixelsFlipped in RenderTexture.cpp. I'm sure there are valid reasons to handle something like this internally, though.
It's very satisfying to see things come together - my drawing wrapper now produces the same output as with CImg - now onward to the per-pixel operations.
Thanks again - and have a great day/night.
Many thanks for this, texus - it works nicely now, and I no longer feel like I'm misusing SFML.
It felt silly to perform the same sequence of copies again to flip back.
As well as similar items to the bug I linked to, it added to my confusion that I saw m_pixelsFlipped in RenderTexture.cpp. I'm sure there are valid reasons to handle something like this internally, though.
It's very satisfying to see things come together - my drawing wrapper now produces the same output as with CImg - now onward to the per-pixel operations.
Thanks again - and have a great day/night.