[xorg-bugzilla-noise] [Bug 382] New: Timing patch for glxgears to rotate smoothly.

bugzilla-daemon at pdx.freedesktop.org bugzilla-daemon at pdx.freedesktop.org
Mon Mar 29 00:47:39 PST 2004


http://pdx.freedesktop.org/cgi-bin/bugzilla/show_bug.cgi?id=382

           Summary: Timing patch for glxgears to rotate smoothly.
           Product: xorg
           Version: unspecified
          Platform: All
               URL: http://bugs.xfree86.org/show_bug.cgi?id=926
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: xt
        AssignedTo: xorg-bugzilla-noise at freedesktop.org
        ReportedBy: freedesktop at behdad.org


I first reported this on xfree86 bugzilla, with no response.  Pasting here now:

Traditionally glxgears and the original gears program, have a main drawing loop,
and add to angle two degrees in each frame.  Two degrees out of 360 may have
been a good value in old days, but let's see what does it do now:

* On my laptop with DRI enables, I get more than 1000FPS from glxgears.
* 1000*2 = 2000 = 6 * 360.  Means the gear rotates 6 rounds in a second!
* I get something around 60 frames on my LCD display, so I get around 2000/60
degrees of rotation between frames on the screen.
* The gears have 10 teeth, each 36 degrees then.
* Net result:  I see the gears stopped!

- If I would get something around 500FPS, then I would see them rotating so fast
that one cannot say in which direction they are rotating.

- With around 250FPS you see the rotating in the right direction, but so fast.

- With around 750FPS you see them rotating in the other direction.

- With so much degrees to rotate in each frame, a simple delay would cause in a
bad jerk in movement.

The attached patch fixes the rotation speed of the gears, so no matter what FPS
you get, the gears rotate smoothly.  Some extra bells and whistles done too
(change speed, ...).

The reason I went for the patch is that everyone seems glxgears rotating *jerky*
on his computer, so at least you would think there's a bug in your driver, if
not hardware.



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the xorg-bugzilla-noise mailing list