PDA

View Full Version : Full screen antialiasing



digitalshooter
09-07-2008, 07:14 PM
Hi, can anyone teach me how to use antialiasing for everything I draw in my window ? From what I can get from my book, I enabled point, line, polygon smoothing; I called GL.Enable(GL.MULTISAMPLE_ARB) too (I'm writing C# code ) but the result I got is not so impressive (edges of my sphere is still jagged)

Do I need to call some functions in OpenGL 1.3 ?(beyond functions defined in opengl.dll)

Thank you for your help.

unsigned void
09-07-2008, 11:03 PM
How do you create opengl context? Antialiasing cannot be turned on and off during rendering (without recreating window). Simplest method is just use your video card's control panel and turn on antialiasing there globally.

Rosario Leonardi
09-08-2008, 09:14 AM
Enabling point smooth, line smooth and polygon smooth enable the obsolete antialiasing, it's very slow, work with depth buffer and work only is you draw the mesh back to front.

Multisample buffer if far away better, but it use more memory.
You can find how to use the MUTISAMPLE ARB extension here: -> http://developer.nvidia.com/object/gdc_ogl_multisample.html <-

Zengar
09-08-2008, 11:59 AM
How do you create opengl context? Antialiasing cannot be turned on and off during rendering (without recreating window). Simplest method is just use your video card's control panel and turn on antialiasing there globally.

Of course it can. The man problem is to create a context with additional sample buffers. This is done by setting the pixelformat of the window to a multisample-able format (using the WGL_ARB_MULTISAMPLE). You can then turn multisampling on and off by using the glEnable

digitalshooter
09-09-2008, 06:53 AM
I found this link on the net:
http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=46

I think that link is very helpful, it teaches well about antialiasing using multisampling (using the WGL_ARB_MULTISAMPLE), much better than my book. I have successfully used multisampling in my program. I sweet a little in C# :). But it works only on my desktop (Nvidia 8600GTS + latest driver), it does not work on my laptop (Intel 915M+ original driver) 'coz my laptop does not support WGL_ARB_MULTISAMPLE.

But on my laptop I found that, we should use the combination of wglGetExtensionsStringARB and glGetString(GL_EXTENSIONS) to get all the extensions that the card support, otherwise we could miss something. My desktop card return null with glGetString, only wglGetExtensionsStringARB works; but they both work on my laptop and return non-overlapped results!

Thank you very much for your advices and links. But is there any other technique to do full screen antialiasing , apart from multisampling?