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.
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.
Originally posted by Erakis:
[b]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 ?
[/b]
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