This is the source code:
int main()
{
Font font;
font.loadFromFile(String("arial.ttf"));
RenderWindow window(VideoMode(640, 480), "1");
Text text("8", font, 32);
text.setColor(Color(0, 0, 0, 255));
FloatRect r;
r=text.getGlobalBounds();
text.move(-r.left, 0);
RenderTexture tex;
tex.create(r.width, 50);
tex.clear(Color(0, 0, 0, 0));
tex.draw(text, RenderStates(BlendNone));
tex.display();
Sprite s(tex.getTexture());
while (1){
window.clear(Color(255, 255, 255, 255));
s.setPosition(100, 160);//OK
window.draw(s);
s.setPosition(100.5, 190);//BUG
window.draw(s);
window.display();
Event event;
window.waitEvent(event);
if (event.type == Event::Closed)break;
}
return 0;
}
I want to draw some text to a render target, and draw the target texture to screen. But the text on the screen
seems abnormal.
http://pan.baidu.com/s/1bnTZ5ARIs it a bug? If yes,I hope it can be fixed as soon as possible. After all, it is really a serious bug. Thanks very much.