1
Graphics / SFML2 Exception while drawing sf::Text
« on: December 30, 2010, 11:42:12 pm »
Damn... don't be so fast! :lol:
Thanks for fixing.
Thanks for fixing.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
#include <SFML/Graphics.hpp>
int main(void)
{
sf::RenderWindow app;
app.Create(sf::VideoMode(800, 600), "Foobar");
sf::Font font;
font.LoadFromFile("comic.ttf");
sf::Text text("Foobar");
while(app.IsOpened())
{
sf::Event evt;
while(app.GetEvent(evt))
{
if(evt.Type == sf::Event::Closed)
app.Close();
}
app.Clear(sf::Color::Magenta);
app.Draw(text); // Here it happens
app.Display();
}
}