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

Pages: [1]
1
I will search for that then. Thank you very much!

2
Update or downgrade your ATI drivers.

This worked. How strange that the problem is so specific. Is there no other way to fix this issue? Id like to know in case someone who plays my game has the same not updated driver. I wouldn't want them to not see the background.  :/

Thank you though!

3
I ran across a very strange issue while working on my game. I use the latest SFML2 library.

This is the code I'm working with for reference:

 while (window.isOpen())
    {
        window.clear();

                // just some sprite
                sf::Sprite sprite;
                sf::Texture * txtr = new sf::Texture();
                txtr->loadFromFile("images/shipViewBg.png");
                sprite.setTexture(*txtr);

                // just some shape
                sf::RectangleShape shape;
                shape.setOutlineThickness(1);   // <-- important line
                shape.setPosition(50,50);
                shape.setSize(sf::Vector2f(50,50));

                window.draw(sprite);
                window.draw(shape);

        window.display();
    }
 

Now, the issue:
I want to be able to display a bunch of sprites and then draw a transparent rectangle on top with only a border (a selection box basically)
What I found was that when I set a border thickness to my box, the first sprite to be draw on screen gets stretched out significantly. If I comment out the border thickness, both draw correctly.

Here are a few comparison screenshots with the previous code:


Code as is above.


Thickness line commented out
// shape.setOutlineThickness(1);


Only drawing the shape


Only drawing the sprite


The strange thing is is that it only affect the first sprite drawn on screen. All subsequent sprites are draw correctly. Just the first one is stretched out.

Any thoughts? Am i doing something wrong?

Pages: [1]