Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: problem about using double buffer with vertical sync?

  1. #1
    Junior Member Newbie
    Join Date
    Mar 2004
    Location
    500 N. Wolfe Streete
    Posts
    1

    problem about using double buffer with vertical sync?

    Hi!

    In windows, I used the double buffer to display 1000 random dots with a 1024x768 resolution, 60Hz CRT monitor. I am using Ge-force FX 5900 also.

    1. The default of the vertical sync alway is on for the OpenGL.
    2. The 2D texture is used.
    3. Also the double buffer is used.
    4. Swapbuffer() is called after calling all OppenGL draw functions in the display
    updata loop.
    5. In each display updata loop, GetTickCount() is called to check the time before
    I call all draw functions.

    So, the difference between two frame time's readings is the time interval between two frames. The followings are the time intervals between frames.

    16
    15
    16
    16
    15
    16
    16
    15
    16
    15
    16
    16
    15
    16
    31
    .
    .
    .
    (repeat)

    I found the interval between 15th and 16 frame takes two frame times 30~31msecond, which happens in each 16 frames, even I decreased the dots number down to one dot from 1000 dots.

    I guess:
    It looks like that there may be 1 msecond time delay on each frame. After 16 frames, totally there are 16 msecond cumulated time delay. This made the 16th video buffer updating request just after the vertical sync of the new 16th frame, So, the time waiting for the 16th swapbuffer() return takes two frame time(30~31msecond).

    Is there any ideal how to solve this problem?

    What I need is the exactly updating screen in the each single frame time period. Could someone recommend me how to do this?

    Thanks,

    Haolei
    Lei Hao
    Johns Hopkins University

  2. #2
    Junior Member Regular Contributor
    Join Date
    Mar 2004
    Posts
    143

    Re: problem about using double buffer with vertical sync?

    Just for clarification:

    Do you draw your "dots" into a 2d texture and upload that every frame?

    Because thats is what I think you do or at least that is what I understood from "the 2d texture is used".

    Could you elaborate a bit more detailed what _exactly_ you are doing?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •