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

Pages: [1]
1
Graphics / Re: sf::Texture::setRepeated Problems
« on: July 25, 2014, 12:37:34 am »
Thanks to both of you.

2
Graphics / Re: sf::Texture::setRepeated Problems
« on: July 24, 2014, 02:24:42 am »
But, i want the Desert.png picture filling the entire window.

3
Graphics / sf::Texture::setRepeated Problems
« on: July 24, 2014, 12:38:31 am »
#include <SFML/Graphics.hpp>
int main(){
        sf::RenderWindow window(sf::VideoMode(1280,720), "TesteGame");
        window.setPosition(sf::Vector2i(65,5));
        sf::Texture t; t.loadFromFile("Desert.png");
        t.setRepeated(true);
        sf::Sprite s(t,sf::IntRect(0,0,1280,720));
        while (window.isOpen()){
                sf::Event e;
                while (window.pollEvent(e)){
                        if (e.type == sf::Event::Closed) window.close();
                        window.draw(s);
                        window.display();
                }
        }
        return 0;
}
 

This is my code, it compiles without problems, but the the window shows some black areas that i don't know where they came from. Like this.



The picture used in the code.
http://s23.postimg.org/66z9whp8r/Desert.png

Pages: [1]
anything