Jump to content
  • Advertisement
Sign in to follow this  
Happe

Accumulationsbuffer

This topic is 4498 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!