Error using glAccum

Started by
2 comments, last by Clapfoot 17 years, 4 months ago
I get GL_INVALID_OPERATION from glAccum. The call is not made between begin and end. Is there any kind of special initialization that is needed to use the accumulation buffer? Is glAcucum a generally supported feature by most OpenGL implementations? I have a Radeon 9800 pro so i'm assuming it should be supported on my card. Anyone know whats going on here? Thanks a lot!
Advertisement
Alot of cards it's infact only supported in software, however as I recall the 9500 and up and the GF6 (maybe even GFFX) support it in hardware.

However to use it you need to request an accumlation buffer as part of your pixel format; have you done that?
No, I did not do that. Is this all I have to add to my pixel format descriptor?

pfd.cAccumBits = 24;
pfd.cAccumRedBits = 8;
pfd.cAccumGreenBits = 8;
pfd.cAccumBlueBits = 8;
pfd.cAccumAlphaBits = 0;

I'm not getting the error anymore, but nothing shows up on the screen when I do:

glReadBuffer(GL_BACK);
glDrawBuffer(GL_BACK);
glClear(GL_ACCUM_BUFFER_BIT);
glColor3f(1.0, 0.0, 0.0);
DrawCube();
glAccum(GL_ACCUM, 0.5);
glColor3f(0.0, 1.0, 0.0);
DrawCube();
glAccum(GL_ACCUM, 0.5);
glAccum(GL_RETURN, 1.0);

Things show up fine when I don't return the accumulation buffer (when I comment out glAccum(GL_RETURN, 1.0)).

Thanks again!

Edit: I think the accumulation buffer is drawing fine (as I get a grey screen if I do glAccum(GL_RETURN, 0.5)), but I think the scene isn't drawing to the back buffer correctly.
Nevermind, I found out what was wrong .. thanks for the help!! :)

This topic is closed to new replies.

Advertisement