1
General discussions / Re: SFML 2.0 RC
« on: April 22, 2012, 10:03:48 pm »
My bad. I called the constructor with which you can load a font, and now it works perfectly fine. I guess it's the same problem then.
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() {
sf::RenderWindow window(sf::VideoMode(300, 200), "SFML works!");
sf::Font fnt;
fnt.loadFromFile("C:/Windows/Fonts/ARABTYPE.ttf");
sf::Text text("Hello SFML");
text.setFont(fnt);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(text);
window.display();
}
return 0;
}
#include <SFML/Graphics.hpp>
int main() {
sf::RenderWindow window(sf::VideoMode(300, 200), "SFML works!");
sf::Font fnt;
fnt.loadFromFile("C:/Windows/Fonts/ARABTYPE.ttf");
// sf::Text text("Hello SFML");
// text.setFont(fnt);
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
// window.draw(text);
window.display();
}
return 0;
}
#include <SFML/Graphics.hpp>
int main()
{
sf::RenderWindow window(sf::VideoMode(300, 200), "SFML works!");
sf::Text text("Hello SFML");
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
window.clear();
window.draw(text);
window.display();
}
return 0;
}
template <class T = Uint32>
class Clock;
template <>
class Clock<Uint32> {/* milisec implementation */};
template <>
class Clock<Uint64> {/* nanosec implementation */};
template <>
class Clock<double> {/* double implementation */};
// A float implementation ???
template <>
class Clock<float> {/* float implementation */};