Double Buffer Problem (Win98)

When I enable double buffering in Win98 it seems to update strangely (it jitters), but for Win2k it updates nicely (and smoothly). Is there problem with my GL Screen Initialization?

void InitGL( HWND hWnd, HDC & hDC, HGLRC & hRC ) {
PIXELFORMATDESCRIPTOR pfd;
ZeroMemory( &pfd, sizeof pfd );
pfd.nSize = sizeof pfd;
pfd.nVersion = 1;
pfd.dwFlags = PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER;
pfd.iPixelType = PFD_TYPE_RGBA;
pfd.cColorBits = 24;

hDC = GetDC( hWnd );

int i = ChoosePixelFormat( hDC, &pfd );
SetPixelFormat( hDC, i, &pfd );

hRC = wglCreateContext( hDC );
wglMakeCurrent( hDC, hRC );
}

  • VC6-OGL

I don’t see a problem with your code. Do you think it could be a monitor refresh rate problem?

-Halcyon

Edit: Is this problem specific to this application alone, or do all your applications behave like this on Windows 98?

I don’t know if this is it or if it has anything to do with this problem, but I typically also put the PFD_DRAW_TO_WINDOW flag. Also, i set the depth bits to 16, 24, or 32. I don’t think they have anything to do with the issue at hand, but it’s worth trying

[This message has been edited by Halcyon (edited 01-10-2003).]

I have only tested my program on:
1.0Ghz
512MB RAM
Geforce 3 Ti200
Windows 98

Any other program kinda works, but Win98SE is not perfect. It may be because I am using Double Buffering, but I think it’s Win98, which Win2k works just fine.

  • VC6-OGL