PDA

View Full Version : glAccum (blur effect) working with with one graphi



neo187
12-05-2011, 07:03 AM
Hello

I am trying to create a "blur" effect in my opengl game, whereby in certain sections I enable the following code and the vision blurs for a bit...


if(world->blur){
glAccum(GL_MULT, 0.85);
glAccum(GL_ACCUM, 1- 0.85);
glAccum(GL_RETURN, 1.0);
glFlush();
}

Which works fine when I am using my laptop's integrated chip, which often results in lower framerate, but if I enable the ATI gpu which gives me faster performance then the effect is not visible...


I am using a fixed-time clock on my game:

tickTime += dt;
if(tickTime >= 1/DESIRED_FRAME_RATE){
level->update(tickTime);
world->update(tickTime);
renderer->drawScene(tickTime);
tickTime = 0;
}

Is there some obvious reason why this happens?

Thanks a lot for any help

carsten neumann
12-05-2011, 04:43 PM
glAccum(GL_ACCUM, ...) requires that a buffer is selected for reading, see glAccum (http://www.opengl.org/sdk/docs/man/xhtml/glAccum.xml). Do you enable a read buffer? Is it the correct one? Note that depending on where you do buffer swapping and clearing relative to the accumulation buffer stuff you may want to read from the front buffer.