1
Graphics / filling the window with a texture
« on: November 25, 2011, 06:02:41 pm »
hi everyone, i've got a problem with filling the window. This is my code:
I try to start new line (spr[0].SetPosition(0,temp)) and it isn't working. The only first line is filling with texture. Why and what should i do to make it working.
Code: [Select]
void textureStore::drawMap()
{
unsigned int temp=0;
int zm=50;
sf::String text;
for(int i=0; i<Y; ++i)
{
for(int j=0; j<X; ++j)
{
screen->Draw(spr[0]);
spr[0].Move(50,0);
temp+=50;
}
spr[0].SetPosition(0,temp); //it isn't working!
screen->Draw(text);
}
}
I try to start new line (spr[0].SetPosition(0,temp)) and it isn't working. The only first line is filling with texture. Why and what should i do to make it working.