Sign in to follow this  

Accumulationsbuffer

This topic is 4283 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, for many hours I try to implement anitaliasing using the accumulation buffer. However I could not get it started until now. this is my code: private void rendering() { Gl.glEnable(Gl.GL_BLEND); Gl.glEnable(Gl.GL_LINE_SMOOTH); Gl.glEnable(Gl.GL_MULTISAMPLE); Gl.glHint(Gl.GL_LINE_SMOOTH_HINT, Gl.GL_DONT_CARE); Gl.glBlendFunc(Gl.GL_SRC_ALPHA, Gl.GL_ONE_MINUS_SRC_ALPHA); Gl.glEnable(Gl.GL_DEPTH_TEST); Gl.glClearColor(0.350f, 0.350f, 0.350f, 1.0f); Gl.glClear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT); Gl.glClearAccum(0.0f, 0.0f, 0.0f, 0.0f); Gl.glClear(Gl.GL_ACCUM_BUFFER_BIT); int i,j; int min = -1; int max = +1; float scale = 0.5f; for(j = min; j <= max; j++) { for(i = min; i <= max; i++) { Gl.glClear(Gl.GL_COLOR_BUFFER_BIT | Gl.GL_DEPTH_BUFFER_BIT); Gl.glMatrixMode(Gl.GL_MODELVIEW); Gl.glLoadIdentity(); Gl.glTranslatef((float)(i*scale), (float)(j*scale), 0.0f); drawScene(); Gl.glAccum(Gl.GL_ACCUM, 1.0f/9.0f); } } Gl.glAccum(Gl.GL_RETURN, 1.0f); Gl.GlFlush(); } Using this code it does not work, there are no changes like I would not use the AccumBuffer. Do I have to set something else enable or did I forget anything important? I would be really pleased if someone could help me. Thx in advance, Stefan

Share this post


Link to post
Share on other sites
Here is an example of a working multisample app. You might try porting this to your environment and see if you can make it work, then study the differences from your own attempt and isolate the problem.

Share this post


Link to post
Share on other sites

This topic is 4283 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this