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

Pages: [1]
1
Graphics / Re: Random Offset of scene [LinuxMint SFML git]
« on: February 24, 2015, 11:57:37 am »
I use cinnamon desktop

2
Graphics / Re: Random Offset of scene [LinuxMint SFML git]
« on: February 24, 2015, 06:12:42 am »
It is the git version (as mentioned in the title) from like 4 or 5 days ago.

3
Graphics / Random Offset of scene [LinuxMint SFML git]
« on: February 23, 2015, 05:07:07 pm »
Hello there,

I try to develop some SFML app on Linux Mint but I get random offsets in my scene. I would like to know if this has something to do with SFML or maybe with my desktop manager.

Correct:


Wrong:


My code looks like this:
#include <SFML/Graphics.hpp>
#include <tmx/MapLoader.h>

int main()
{
        sf::RectangleShape rect(sf::Vector2f(50,50));
        rect.setPosition(sf::Vector2f(0,0));
    sf::RenderWindow window(sf::VideoMode(640, 480), "SFML works!", sf::Style::Close);

    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
                window.close();
        }
        window.clear(sf::Color(0,255,0,255));
        window.draw(rect);
        window.display();
    }

    return 0;
}

This problem occurs about half the time, no matter what configuration (Debug/Release).

Thanks for any help in advance.

Pages: [1]
anything