I'm drawing a background behind my 3D scene which works as expected (code below). I'm also anti-aliasing the scene using the accumulation buffer (chapter 10 of the red book).
...loop several times (say, n) through code that jitters and draws the image (jittering is moving the image to a slightly different position), accumulating the data with
glAccum(GL_ACCUM, 1.0/n)
and finally calling
glAccum(GL_RETURN, 1.0)
However, I do not want to anti-alias the background. The problem is that calling glAccum with GL_RETURN copies (overwrites) the values in the color buffer (rather than using the depth test and blend functions, etc) to mask the values being written to the color buffer.
How can I draw the background before or after anti-aliasing the 3D scene so that the background looks just like it does when I draw the 3D scene without anti-aliasing?
// Draw the background.
glMatrixMode GL.GL_PROJECTION
glLoadIdentity
glMatrixMode GL.GL_MODELVIEW
glLoadIdentity
glPolygonMode GL_FRONT_AND_BACK, GL_FILL
glDisable glcDepthTest
glBegin bmQuads
// Call glColor and glVertex here.
glEnd
glEnable glcDepthTest