Double buffers

Have the full screen double buffer problems ever been resolved? I am using
SDL-0.10.0 with DirectX 6.1 and am seeing the following:

  1. Set video mode to (640, 480, 0, SDL_FULLSCREEN | SDL_DOUBLEBUF |
    SDL_HWSURFACE)
  2. Verify flags in returned surface (OK)
  3. SDL_FillRect a white block into the upper left corner (0,0,100,100)
  4. Wait for key press
  5. Call SDL_Flip
  6. Wait for key press
  7. Call SDL_Flip
  8. Wait for key press
  9. Exit program

What’s odd is that at step 4 the white block is showing on the screen,
meaning that it was placed on the primary buffer instead of the back buffer
(the surface has not been flipped yet, not unless something else is going
on). The mouse is in the center of the screen but there is a small black
block in the upper left corner where the mouse was originally.

At step 6 the screen is completely black. The mouse is not visible at this
point but it does show up if you move it around. At this point you would
expect the white block to be visible. You should be looking at the original
back buffer that should have been modified in step 3.

At step 8 the screen is back in the state where it was in step 4. It looks
like it is flipping the surfaces but the original output is going to the
primary surface.

I have other apps that I have written using double buffering and raw DirectX
(direct DirectX?) and they work fine so it does not “seem” to be a DirectX
driver problem. I was using DirectX 6.0 but upgraded to 6.1 just to make
sure. I also got the latest drivers for my video card (ATI RAGE LT PRO) and
no difference there either.

I know there were recently other similar problems reported but I never saw
any fixes or workarounds. I went through some of the library source and saw
some suspicious things (SDL_ShadowSurface?) but nothing that really stood
out. It looks like it should work. This isn’t holding me up or anything, my
app is working great in windowed mode and normal fullscreen using (640, 480,
0, SDL_FULLSCREEN).

  • Randi