Adding "window.Display();" before "rt.Clear();" makes it works. Still no idea why. Will spend some time on this issue ASAP (but exams first!).
Can you try to add calls to glFlush() after or before drawing to the render-texture?
first, both solution did not work in my program.
but then, I found a solution (for the moment, the bug did not appear again)
In my program (not in this sample code), I used "sf::RenderTexture*" instead of "sf::RenderTexture"
I changed it to "sf::RenderTexture"
Then, once render texture has been displayed, I create a new sf::texture(rt. GetTexture)
then I create a new sprite using the texture and with both solution, it works like a charm
but if I use a pointer for RenderTexture, it does not work and some artifacts appear
I guess that window.Display() calls glFlush() ?
I put the glFlush() before calling rt.Create()
so Hiura, your sample code should work with glflush if you create a new texture from rt, then create the sprite
by the way thanks a lot to both of you, I will post a message tomorrow after lots of test in order to tell you if problem is resolved or not
Bonne nuit et merci
[/quote]