Does glAccum use AA filter?

Started by
2 comments, last by V-man 14 years, 6 months ago
Hi all, I have a problem with AA in my application, I need to use glAccum function in a post process filter. If I render my objects without this post process filter (so, I'm not using glAccum), objects appear fine without jaggies. Instead, if I activate the post process filter (so, I'm now using glAccum), objects appears with jaggies in edges. I was wondering if glAccum uses or not AA. In my application, the results offered by glAccum (GL_RETURN) are stored in a texture to process the filter. After that, I render a whole fullscreen QUAD with that texture modified by the filter. I have tried to show directly the return of glAccum in the screen, but the results are the same, objects with jaggies. So, my question is: is there a way to activate the AA filter in glAccum calls? Thanks for all and sorry for my English.
Advertisement
Quote:Original post by sylpheed
So, my question is: is there a way to activate the AA filter in glAccum calls?
Not so far as I know.

Also be aware that the accumulation buffer has been deprecated for quite some time. You can achieve the same effects (and more) using framebuffer objects with floating point textures as your accumulation buffer, and a shader to handle your accumulation operation. You can implement AA for framebuffer objects with the EXT_framebuffer_multisample extension.

Of course, on older hardware, the accumulation buffer may be all you have, but in that case, AA will probably be out of reach as well [smile]

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

Thanks for you answer.

Old hardware is not a problem for our purpose, we have a high system requirements, so framebuffer should be supported by clients.

I'll try with framebuffers, but, what would you use to mix the results offered by framebuffers? Using accumulation buffer, I had:

for (...)
...
glAccum (GL_ADD, ...)
...
end
glAccum (GL_RETURN);

With framebuffers, should I use glTexEnvi with GL_COMBINE instead of glAccum (GL_ADD,...)?

Thanks again
glTexEnv is fixed function. You should use shaders for all your rendering.
glAccum(GL_ADD, 0.0) just adds RGBA values. You can have the same effect with
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);

so that adds your RGBA value with whatever is in the framebuffer.
Sig: http://glhlib.sourceforge.net
an open source GLU replacement library. Much more modern than GLU.
float matrix[16], inverse_matrix[16];
glhLoadIdentityf2(matrix);
glhTranslatef2(matrix, 0.0, 0.0, 5.0);
glhRotateAboutXf2(matrix, angleInRadians);
glhScalef2(matrix, 1.0, 1.0, -1.0);
glhQuickInvertMatrixf2(matrix, inverse_matrix);
glUniformMatrix4fv(uniformLocation1, 1, FALSE, matrix);
glUniformMatrix4fv(uniformLocation2, 1, FALSE, inverse_matrix);

This topic is closed to new replies.

Advertisement