TheCherno / Sparky

Cross-Platform High Performance 2D/3D game engine for people like me who like to write code.
Apache License 2.0
1.1k stars 221 forks source link

FPS Camera rotation is jerky in some configuration #73

Open ghost opened 8 years ago

ghost commented 8 years ago

In OpenGL, both Debug and Release, the camera is very jerky: if you slowly move the mouse camera rotates after a considerable amount of movement. For Direct3D, there is something different: the Debug configuration is ok, but the release is a bit jerky, but not as the same grade as OpenGL.

I've also disabled SP_WARN(mouse) to ensure that the issue was not caused by lots of printf calls.

TheCherno commented 8 years ago

I believe this is due to how vsync behaves in OpenGL on Windows. Can you try disabling vsync and see if that fixes the jerkiness?

ghost commented 8 years ago

Where can toggle the vsync?

EDIT: removed vsync writing m_Window->SetVsync(false); in Test3D::OnInit. still jerks.

Ilohama commented 8 years ago

Umm umm, don't you have to keep m_Window->SetVsync(false); to disable it?

alex-couch commented 8 years ago

@Xeryko technically isn't it already disabled since it's set to false?

TheCherno commented 8 years ago

Needs to be tested with vsync turned off in windowed mode.

jannisj1 commented 8 years ago

You should merge with my rawinput pull request, that fixes this actually. At least for me it does.

TheCherno commented 8 years ago

Can someone try this again? it seems okay on my end, although Sparky's vsync setting doesn't seem to switch off for OpenGL.