Issue with rendering on GF2, GF3 in fullscreen mode only


During testing my new game with different video boards (GF2, GF3, GF4, GF FX, Radeon) I’ve found odd bug. It appears only on nVidia GF2 and GF3 in full screen mode only (in windowed mode everything looks OK). Some close polygons start Z-fighting with each other. Especially you can notice it with fake shadows (just textured polygons placed close to level surface). It looks completely weird because all ATI cards and GF 4 and GF FX work just fine.

Moreover in windowed mode everything is OK. What is wrong?

What is difference between fullscreen anf windowed modes on GF2 and GF3?

Make sure your fullscreen buffer is 32 bits.

Well, I use the same code for fullscreen & windowed screen modes. I still incestigate this issue but looks like driver always set 16-bit z-buffer on GF2, GF3. Hm, really odd…

If you ask for a 32 bit zbuffer, it might return a 16 bit zbuffer because aparently ChoosePixelFormat has a bug. So ask for 24 or just write your own choose function.