Jump to content
  • Advertisement
Sign in to follow this  
Clapfoot

OpenGL Error using glAccum

This topic is 4238 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!