Accumulation Buffer problem

Hi all,
Im having some trouble with the accumulation buffer, heres my routine:

Code:


GL11.glDisable(GL11.GL_DITHER); 
GL11.glEnable(GL11.GL_SCISSOR_TEST); 
GL11.glScissor(0, 0, width, height); 
GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_DEPTH_BUFFER_BIT); 
GL11.glDisable(GL11.GL_SCISSOR_TEST); 
GL11.glEnable(GL11.GL_DITHER); 

GL11.glClear(GL11.GL_ACCUM_BUFFER_BIT); 
  for (int i = 0; i < 16; i++) { 
    GL11.glBegin(GL11.GL_QUADS); 
    GL11.glVertex3f(0 + (i/5), 0 + (i/5), 0); 
    GL11.glVertex3f(0 + (i/5), 1 + (i/5), 0); 
    GL11.glVertex3f(1 + (i/5), 1 + (i/5), 0); 
    GL11.glVertex3f(1 + (i/5), 0 + (i/5), 0);    
    GL11.glEnd(); 
    GL11.glAccum(GL11.GL_ACCUM, 1.0f / 16f); 
  } 
GL11.glAccum(GL11.GL_RETURN, 1.0f); 

GL11.glFlush(); 
Window.update();

and I get this error:

org.lwjgl.opengl.OpenGLException: Invalid operation (1282)
at org.lwjgl.opengl.Util.checkGLError(Unknown Source)
at org.lwjgl.opengl.Window.update(Unknown Source)

Im using LWJGL 0.9.

Any ideas?

even just:


GL11.glClear(GL11.GL_ACCUM_BUFFER_BIT);
GL11.glAccum(GL11.GL_RETURN, 1.0f);

gets me the same error! :-[

You don’t have any way of specifying accumulation buffers in LWJGL, so it’s probably not supported in your context. Same story with aux buffers. They should be added I suppose.

  • elias

That means the following to me:

No simple way to do motion blur (albeit slow)
No simple way to antialias
No simple way to do soft shadows
and no simple way to do depth of field.

DP

Worry not, it will soon come to a LWJGL implementation near you!

  • elias

yay! :slight_smile: