I switched to new computer with Win 7 64bit(SFML 2.1) from Win XP 32bit(SFML 2.0) and now i cannot render text, I always got only black screen. Here is code:
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>
#include <SFML/System.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(800, 600, 32), "");
window.setFramerateLimit(60);
while(window.isOpen())
{
sf::Event event;
while(window.pollEvent(event))
{
if(event.type == sf::Event::Closed)
window.close();
if(event.type == sf::Event::KeyPressed && event.key.code == sf::Keyboard::Escape)
window.close();
}
sf::Text text;
text.setString("hello");
text.setColor(sf::Color::Red);
window.clear();
window.draw(text);
window.display();
}
return 0;
}