PDA

View Full Version : glAccum distortions



Peter Maarssen
09-26-2008, 10:14 AM
When I use the following code, I'll get like 0.25 fps and horizontal lines which shouldn't be there.
What am I doing wrong, it is supposed to be a motion blur :)


SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);

SDL_GL_SetAttribute(SDL_GL_ACCUM_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_ACCUM_GREEN_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_ACCUM_BLUE_SIZE, 8);

SDL_GL_SetAttribute(SDL_GL_ACCELERATED_VISUAL, 1);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);

loop:
drawScreen();
glAccum (GL_MULT, 0.5f);
glAccum (GL_ACCUM, 0.5f);
glAccum (GL_RETURN, 1f);
SDL_GL_SwapBuffers();

ZbuffeR
09-28-2008, 11:10 AM
Accumulation buffer is rarely accelerated.

Peter Maarssen
09-29-2008, 12:05 PM
Erm, ok :)
thanks