Hi there… I’m having a pretty weird problem, and want to discard it being a driver problem before I keep struggling my head to try to fix it.
I have a pbuffer implementation (in C#) that works fine on all cases… EXCEPT this one.
I have no clue why, but for some reason, on this pbuffer I have (just one of them, works fine with others), the ZBuffer doesn’t get cleared correctly.
I clear it, and it just doesn’t work, it just clears a band, or squares, or nothing at all, and gives out some garbage on it…
HOWEVER, if I switch the application to other one, it instantly starts working ok.
I’ve tried creating the pbuffer without a depth buffer, and it works correctly (except that I do need a zbuffer for it)… I’ve tried setting different values for the depthbuffer clear (via glClearDepth) and they work fine, except that the garbage will still be there (that is, the parts where it does actually get cleared, gets cleared with the correct values).
The fact that makes me suspect that it’s a driver problem, is precisely that switching the application makes it work just fine (I can switch back to my application and it’ll keep working fine).
I’m using a NV GF5600XT with 61.77 Forceware, using a dual display, although I have the acceleration settings for Single display mode (I do not need the secondary screen to be accelerated).
Here’s a snapshot of the problem:
Of course, nothing is changed in the code between those two snapshots (it’s in fact, the same execution).
The difference on the image comes because it’s moving… the movement works ok.
The lines and garbage you see is isolated to come definitely from the zbuffer having garbage (as switching off the depth buffer testing removes the problem).
I’m definitely clearing it before drawing, depth buffer writes are on, there’s no masking or alpha test going on at all.
I’ve been using OpenGL for 5 years and kinda know all the basic stuff and trust me, I’ve tested everything I can imagine before posting this