123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|607|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz Max -> Vsync and Input Lag - Fixes...

Mon, 16 Jan 2012, 14:15
therevillsgames
For the past few days, I've been looking into various fixes for input lag when using vsync.

Over on bb.com, we think that we have found an okayish solution, which involves performing an occlusion query after flipping on DX9 and a grab pixel for DX7 and OpenGL.

For the DirectX9 fix you need to alter the BlitzMax modules:

In brl.mod/graphics.mod/graphics.bmx add UseDX9RenderLagFix:



And in brl.mod/dxgraphics.mod/d3d9graphics.bmx:


For the DX7/OpenGL fix, you need to just call GrabPixmap every frame before flip:



I've tested these on 3 PCs, on one of the PCs the GrabPixmap hurt the FPS so bad when using DX9 so thats why we use an occlusion query for DX9

I've uploaded an exe if you guys could please test and post back your results (with PC specs):

diddy.googlecode.com/files/dx9.debug.zip

Thanks