Hey guys,
First, I'm new to the forum and hope it's the right section.
I'm tryin' to code a simple SDL2 program, that uses an own mouse cursor and animates a model. I wrote the code all by myself (except for the SDL library ^^)
The program's got a typical game loop -> draw() function and update() function. It detects the time it needs for drawing and updates the game for that time step, like most games do. The program always draws. The cursor updates its' position every (1000 / fps)ms.
My screen is set to 60 fps. The program also shows the actual fps it does. no matter whether i set my screen to 60 fps or 75 fps (it's possible), the programs' fps is always near to the screens' fps setting.
The problem:
the screen will not render correctly. the model animation always looks fuzzy / blurry. Same problem with the cursor. The background is set to black. So why is that? Other forums were no help yet.
What i tried:
the graphics use transparent background. it has no effect to set a transparent color (like 0xff, 0x00, 0x00) to make it transparent by SDL2 (what i thought could run faster).
What i found out:
when i set the background to white, at least the cursor is drawn correctly and looks good, no matter how fast i move it. and as you can see when you run the program: the model is better drawn, when it moves slower, than when it's moving fast. (that's why the model moves fast right, and left slow, to demonstrate it)
I use visual studio 2013. you can download the whole project here to test it:
http://www.wp1105995.server-he.de/project.zip
problem summarized:
SDL does not draw fast enough for any reason. my screen works fine for any other applications (like other games). i would appreciate any help...