kingc8
April 8, 2010, 3:48am
1
Hi,
From experience of both ATI and nVidia hardware I find that updating geometry locations from a hardware input ever-so-slightly laggy.
For example, if you attach some textured quad to the mouse coordinates and move the mouse, you see it trail the mouse cursor a little.
Why does it do that? Is there latency to uploading the mouse coordinates from main memory to the gpu hardware? I’m using OpenGL 1.2.
I’m moving to other input mechanics and now this lag is starting to become an experience-damaging issue.
I’m using nvidia 9600m with nvidia 185 drivers on linux.
Thanks for any information,
Cameron
eile
April 8, 2010, 5:54am
2
OpenGL is a pipeline, that is, the CPU is a couple of rendering frames ahead of the GPU (typically up to 2-3 frames). You can enforce less lag using glFinish (or possibly glFlush), at the expense of overall performance. Newer cards support more fine-grained extensions such as fences which might be useful to you.
I confirm glFinish() is very effective for this. Place it right after swap buffers command.
kingc8
April 8, 2010, 7:32am
4
Thanks very much for your help.
Thank you, Zbuffer, this solved our problem as well.
blink
November 22, 2010, 6:46am
6
ZbuffeR for the president!
This glFinish() after swap buffers trick should be on the first page of any tutorial!
Edit: Oh eile i mean, or both?
ZbuffeR
November 22, 2010, 7:49am
7
@blink : Does your edit mean “ZbuffeR for eile” or “eile for president” ?
… LOL …
blink
November 22, 2010, 8:04am
8
I’ll leave it to you, you are free to pick the one you like!