Original Post
Recently I've been having more trouble with the stencil buffer than I'd like to admit. No matter how I render to it or clear it, it will always be filled with ugly artifacts and junk.
Here is a dump of the stencil buffer from a recent run.
Also, if I attempt to use the GL_INCR stencil operation, the value in the stencil buffer (if its not one of the junk pixels) will increment from 0 to 1 in the first pass, but will then go from 1 to 0 in the second pass. This makes it seem like I do not really have the 8 bit stencil buffer I requested with my pixelformat (Win32) even though GL_STENCIL_BITS is 8 and my pixel format does have a StencilBits value of 8 as checked via DescribePixelFormat.
The junk in the stencil buffer was reproduced on a friend's computer, who has a different video card than me as well on another one of my computers which was using software rendering. The inability to increment has occured on my two computers as well as two friends' computers.
Relevent code furnished upon request, but does anyone have some immediate suggestions?
[edited by - Omaha on July 31, 2003 12:54:01 PM]