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.
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.
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 <-
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
I found this link on the net:
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?