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 - Great Programmer

Pages: [1]
1
Graphics / Ugly sprite drawing
« on: July 21, 2011, 07:52:21 am »
Hi.

I'm trying to draw an image on the screen, but the one I draw looks much worse than the original.

On the left the real image, on the right it's as sfml draws it:



I tried bmp, png and jpg formats, as well as different sizes - always the same.
What to do if I want to draw the image exactly as it's in the file?


Here is my code for the image:

Code: [Select]
RenderWindow window;
window.Create(VideoMode(640,480,32),"SFML Window");

Image img;
img.LoadFromFile("kon.PNG");

Sprite sprite;
sprite.SetImage(img);
sprite.SetPosition(100.f,100.f);

...

window.Clear(Color(0xff,0xff,0xff));
window.Draw(sprite);
window.Display();

2
General / tutorials
« on: July 19, 2011, 07:42:37 pm »
hi, the tutorials for version 1.6 also works on sfml2?
i'd like to make a game in the newer one, but i don't see any useful tutorials for that release.

Pages: [1]
anything