Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

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.


Messages - Laugilus

Pages: [1]
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.

2
General discussions / Re: SFML 2.0 RC
« on: April 22, 2012, 09:21:17 pm »
I'm not sure it's the same. I launched the do-not-crash example, and it crashes :)

Code: [Select]
#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;
}

Nevertheless, if I comment some lines, it works (if I don't draw the text)
Code: [Select]
#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;
}

I will investigate further when I have time. Btw I don't know whether this is the right place to talk about this, is it ?

3
General discussions / Re: SFML 2.0 RC
« on: April 22, 2012, 07:41:08 pm »
I have an issue, even if it's not a big deal. And maybe it's just due to my messy installation of SMFL.

When I launch the tutorial example :
Code: [Select]
#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;
}

I get a run-time error. The window appears properly and the text is well displayed. But when I close the window, I get a segfault error (-1073741823). Why is that ?
I'm on Windows 7 64-bits, and compile with gcc 4.6.something.

Thx and nice job!

4
General discussions / Switched times to Uint32 milliseconds in SFML 2
« on: December 15, 2011, 01:21:38 pm »
What about :

Code: [Select]
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 */};


If every implementation shares the same API, you won't "complain about the bloated API".

Pages: [1]
anything