Helllo!
I have a problem when I use 2 RenderTexture and a CircleShape.
If I draw the on the first RenderTexture, this on the second RenderTexture and then on the screen and if I move the Circle, I obtain som pixels where the circle was and shouldn't be.
I use the last version of sfml 32 bits. I'm on Windows 7 and I use a Nvidia 650M GT (up-to-date). I have tried with last sdk and last version of github. I don't have tried with 64 bits version.
Here is my code:
#include "stdafx.h"
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(500, 500), "SFML works!");
sf::RenderTexture t1,t2;
sf::Sprite s1,s2;
sf::CircleShape shape(10.f);
shape.setFillColor(sf::Color::Green);
t1.create(500,500);
t2.create(500,500);
s1.setTexture(t1.getTexture());
s2.setTexture(t2.getTexture());
int i = 5;
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
t1.clear();
t2.clear();
t1.draw(shape);
t1.display();
t2.draw(s1);
t2.display();
i += 5;
shape.setPosition(i,0);
window.clear();
window.draw(s2);
window.display();
}
return 0;
}
and the result:
Thanks a lot!