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 3 of 3

Thread: glFlush() Problem

  1. #1
    Intern Newbie
    Join Date
    Apr 2001
    Posts
    36

    glFlush() Problem

    When I draw triangle moving, scalling, rotating on a Windows (single buffer), I got
    flicked effet !!!

    Pixel format declaration :
    ............................................
    dwFlags = PFD_DOUBLEBUFFER | | PFD_DRAW_TO_WINDOW | | PFD_SUPPORT_OPENGL
    nVersion = 1;
    cColorBits = 16;
    CdepthBits = 16;
    .............................................

    At the end of my OpenGL command I just use the glFlush(); command...
    If I well understand I don't have to use SwapBuffers cause I specify that my pixel format descriptor doesn't support the Double Buffer ?
    But why I got this flick effect ? If I activate the Double buffer, the effect disapear.


    I have a GeForce˛ GTS Pro 32Mo DDR
    Athlon 1.2Ghz

    Thank in advance.

  2. #2
    Junior Member Regular Contributor
    Join Date
    May 2001
    Location
    Germany, Hannover
    Posts
    224

    Re: glFlush() Problem

    thats normal in singlebuffer mode(you see your drawing when it occurs and that is the flickering), you have to use doublebuffer if you dont want to have flickering!
    dont use | | instead use |, i dont know where the difference is but all books and coders(i think) use a single OR by combining flags.

  3. #3
    Intern Contributor
    Join Date
    Jun 2001
    Posts
    69

    Re: glFlush() Problem

    Originally posted by Erakis:
    Pixel format declaration :
    ............................................
    dwFlags = PFD_DOUBLEBUFFER | | PFD_DRAW_TO_WINDOW | | PFD_SUPPORT_OPENGL
    nVersion = 1;
    cColorBits = 16;
    CdepthBits = 16;
    .............................................

    At the end of my OpenGL command I just use the glFlush(); command...
    If I well understand I don't have to use SwapBuffers cause I specify that my pixel format descriptor doesn't support the Double Buffer ?
    eh? PFD_DOUBLEBUFFER means that you use doublebuffering, so you have to use SwapBuffers()

    oh... your dw_flags are WRONG, you use the logical or ( | | ), that's for boolean operations, so in your case your dw_flags contains a senseless value (or at least not what you want)
    you have to use the bitwise or ( | ) then all should work fine, including the doublebuffer

Posting Permissions

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