Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About Happe

  • Rank
  1. 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
  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!