des
07-06-2006, 03:24 AM
Hi all! I've got a problem. I'm trying to make motion blur using accumulation buffer. There is no example by this theme in the "Redbook". So, i have the code like this:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glAccum(GL_RETURN,1.0); //Drawing last frame, saved in buffer
//Drawing the scene
//...
glAccum(GL_LOAD,1.0); //saving current frame in the buffer
glAccum(GL_MULT, <SomeNumber> ); //make current frame in buffer dim
SwapBuffers(MainDC);
So, as I understand, starting width second frame the motion blur should be rendered. But there is no motion blur. I think when I swap buffers the accumulation buffer is clear, but why? :confused:
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
glAccum(GL_RETURN,1.0); //Drawing last frame, saved in buffer
//Drawing the scene
//...
glAccum(GL_LOAD,1.0); //saving current frame in the buffer
glAccum(GL_MULT, <SomeNumber> ); //make current frame in buffer dim
SwapBuffers(MainDC);
So, as I understand, starting width second frame the motion blur should be rendered. But there is no motion blur. I think when I swap buffers the accumulation buffer is clear, but why? :confused: