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 - syndicatedragon

Pages: [1]
1
General / Re: Singleton with RenderWindow member and static SFML libs
« on: July 26, 2013, 04:48:55 pm »
OK, that's good to know. Honestly I had not seen any indication that it can't be used in this way in the tutorials or documentation.

I'm curious though, why does it work with the dynamic libs?

2
General / Singleton with RenderWindow member and static SFML libs
« on: July 26, 2013, 01:16:22 am »
I'm using Visual C++ 2010. The following code crashes when starting a debug session when linked to the SFML static debug libraries. It works FINE debugging when linked to the shared debug SFML libraries! Also, if you comment out the _window member, it works fine with the static libraries. Any ideas why?

#include "SFML\Graphics.hpp"

class Singleton {
protected:
        Singleton() { }
        static Singleton _singleton;
        sf::RenderWindow _window;
};

Singleton Singleton::_singleton;

int main(int argc, char *argv[])
{
    sf::RenderWindow window(sf::VideoMode(200, 200), "SFML works!");
    sf::CircleShape shape(100.f);
    shape.setFillColor(sf::Color::Green);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }
        window.clear();
        window.draw(shape);
        window.display();
    }
        return 0;
}

3
General / Multiple "world spaces" in the same window?
« on: June 14, 2013, 11:07:37 pm »
Is is possible to have multiple world coordinate spaces in the same window? Here is an example of what I mean. Let's say I want to put a map display in one half of the window, and a text display in the other. What I would like is that the origin of both the map display and text display to both be 0, 0. That way they can be rendered independently of each others' size and position. It seems like I could accomplish this by rendering to textures and then putting those textures where I want them, but I wanted to make sure the engine didn't already support this in a different way before I started.

Thanks.

Pages: [1]
anything