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

Pages: 1 ... 14 15 [16]
226
Graphics / Re: Scale sprites with repeating instead of stretching
« on: July 19, 2013, 11:03:21 am »
Sorry, just found an answer... setTextureRect. Anyway thank you very much!!!

227
Graphics / Re: Scale sprites with repeating instead of stretching
« on: July 19, 2013, 10:58:58 am »
Sorry, but how to use it?

I'm doing this:

BackgroundTexture.loadFromFile("data/img/gui/mainmenu/bg.jpg");
BackgroundTexture.setRepeated(true);
Background.setSize(sf::Vector2f(1024,768));
Background.setTexture(&BackgroundTexture);

but the image is still scaling instead of repeating

228
Graphics / Re: Scale sprites with repeating instead of stretching
« on: July 19, 2013, 09:51:43 am »
Thanks a lot, Laurent! I'll do it right now.
And your project is awesome!  ;)

229
Graphics / Scale sprites with repeating instead of stretching
« on: July 19, 2013, 09:30:16 am »
Hi. I'm new in SFML, but have experience in OpenGL.
Well... Is there a way to fill background with some sprite in SFML v1.6?

For example sprite size is 512x512, screen size is 1024x768.

If I resize it to screen size, the texture coordinates will still be the (0, 0) - (1, 1) and the sprite streches.
How can I resize sprite with changing texture coordinates to (0, 0) - (2, 1.5) to fill all the background without "for" statements etc.?

I've read about sf::RenderTexture and method setRepeated(bool), but it is in SFML v2.0

Pages: 1 ... 14 15 [16]