Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4044760
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:19:54+00:00 2026-05-20T13:19:54+00:00

Edit: added some error checking code and found error ‘1282’ is being thrown when

  • 0

Edit: added some error checking code and found error ‘1282’ is being thrown when I do glAccum(..)

Edit2: I’ve tried the exact same code on a different computer, it works perfectly there.

Edit3: ‘Solution’ ATI HD4xxx and up cards dont support accumulation buffers anymore :*(

So it doesn’t work on Windows 7 64bit with a HD4850 and up-to-date drivers
It does work on Windows 7 32bit with an Intel series 4 IGP. (GL_ACCUM_RED_BITS = 16).
I also tried it really really quick on a Linux based machine of which I don’t know the exact specs, it worked there too. So I guess it really has todo with something in my computer :(. I dont know what though, so any tips are welcome.

Here is the original question.

I’m trying to use glAccum to generate a DOF effect, but the calls to glAccum don’t seem to have any effect. I’ve reduced the problem to a simple test case where in a for loop I translate some spheres along the x-axis. As you can see an error is reported when I try to copy the colour buffer data to the accumulation buffer.

Additionally when I check the number of red bits available in the accumulation buffer, the result is 0. Which would mean that its not initialized?!

I’ve setup the display mode like this:

glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_ACCUM | GLUT_DEPTH);
glClearAccum(0.0, 0.0, 0.0, 0.0);

So the accumulation buffer should be available.

My display method looks like this:

void display(void)
{
    int i;
    GLint test[1];
    float weigth = 1.0/(float)apertureSamples;

    glEnable(GL_LIGHTING);
    glEnable(GL_LIGHT0);
    glEnable(GL_DEPTH_TEST);

    HandleKeyboardInput();
    glLoadIdentity();
    UpdateCamera();

    glClear(GL_ACCUM_BUFFER_BIT);
glGetIntegerv(GL_ACCUM_RED_BITS, test);

    //No errors here but the number of red bits is 0!?
    for(i = 0; i < apertureSamples; i++)
    {       
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); 
        glPushMatrix();
        glTranslatef(10*i, 0, 0);
        DrawScene(); //draw a couple of spheres
        glPopMatrix();
            //Still no errors here
        glAccum(GL_ACCUM, weigth);
            //If I check for errors here I get error 1282
        glFlush();
    }
    glAccum(GL_RETURN, 1.0);

    glutSwapBuffers();
}

I would now expect to see a blurred trail of the spheres, moved to the right, but I don’t, instead I only see the last iteration of the forloop (all the spheres translated on the x-axis by 10*appertureSamples).

To test if glAccum was doing anything at all, I’ve changed the weigth variable to 0.00001 which should have as affect that the each frame is drawn very ‘thin’ (my English vocabulary left me here). But this doesnt seem to have any affect. Then I changed glAccum(GL_RETURN, 1.0) to gl_Accum(GL_RETURN, 0.0001); which again did nothing (but should’ve made the entire output picture thinner.

I’ve followed all the steps under DOF and JITTER from here: http://glprogramming.com/red/chapter10.html and I cant find anything that I’m missing. Does anybody have any tips?

(Btw I’m doing this on a Windows 7 computer with a Radeaon HD4850 GPU).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T13:19:54+00:00Added an answer on May 20, 2026 at 1:19 pm

    If the GL_ACCUM_RED_BITS is zero, it means you don’t have a accumlation buffer, your GL implementation should support it at least in software. The error at glAccum suggests also suggests that no accumulation buffer exists.

    Why are you using the accumulation buffer in the first place? You can do the same effect using Shaders, Framebuffer Objects and Floating point textures, and it’s also compatible with modern OpenGL implementations.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some problems in structuring my python project. Currently it is a bunch
we currently experience some file writing/encoding problems that we cannot reproduce. Actually there are
Im building a small application and I have some click events binded to some
I'm new to the Zend Framework and trying to figure some stuff out. I
I'm trying to get Bison to do it's thing in VC6. I'm sure this
I'm trying to modify the Orchard.Search part with the search form and button to
please, how do i draw image in listbox_DrawItem event by the left side i
I have a problem with my Visual Studio 2005 C# project. I have been
The following declaration adds a couple of operators for compilation in a C++ file.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.