
Why does this happen?
***EDIT:
The first comment here seems to confirm Stingray Polymathic’s (Thanks again!) description of the issue:
http://www.sfml-dev.org/old-forum/viewtopic.php?t=6665&sid=29867a0656278d75e3daec10b7417b8b
I’ll go see about adding in a floor() method to see if that solves things.
EDIT***
*****
Edit 2:
Floor() ‘ing and position update values did the trick for now, and seems to be the best way to handle pixel perfect rendering ( which in retrospect, is rather obvious).
******
Click for a better look at it. It’s a very small 128 x 128 px sprite which should be rendered at a 1:1 scale from my understanding, but for some reason is occasionally distorted. The blue ‘eyes’ are the wrong size and the red triangle looks off if you look at it closely. It might not seem bad looking at the picture, but it’s been annoying.
Background info:
I’m rendering an sf::Sprite in my update loop in a sf::RenderWindow, with the texture from a png file. Everything seems fine usually, but sometimes the sprites seem to distort a bit. As you can see from the clipped screenshots in the background the sprite usually looks the same, but occasionally looks like it does in the running window.
Vsync is enabled, and the top middle yellow text is from a very simple frame rate display i wrote, the top right is from fraps.
If it helps, i use SFML 2.0 rc and you can find all of my library code & the sfml binaries here:
https://bitbucket.org/TheBenjaneer/libnucleode
I have no idea why this happens. It seems random.
Further, until I move the sprite, it continues to be distorted in exactly the same way every frame.
OpenGl 4.3 Context according to my logs. Anti-aliasing is at 8. depth bits at 24.
Nvidia GTX 550 ti, driver v 314.22 (latest)
Windows 7 x64 bit ( engine is built/running 32 bit though ).
Any help, tips, or pointers would be vastly appreciated.
Thank you!
-ben
Tags: C++, opengl, please help, screenshot, SFML 2.0 rc