What is your video card? To have a multisample framebuffer, you need at least to tell the “window api” (glX glut SDL …) that you want that. For example with SDL:
Or,the easiest way to have a multisample buffer, change the settings of your video card driver to force multisampling for all OpenGL application (AMD video card => via catalyst control center).
I never used GL_POLYGON_SMOOTH because on very old hardware ( NVidia TnT2) it was really slow so maybe another people will tell.
First, you don’t use both polygon smoothing and multisampling; you use one or the other.
Second, you have to create a multisampled framebuffer, either manually with FBOs, or using whatever you use to create your window to ask for a multisampled framebuffer.
Did you also turn on blending? Did you also z-sort your triangles from farthest to nearest? Because if you don’t do both of those, you won’t get any “antialiasing”.
is there any example that really works because I’ve found many that didn’t work across the net
Examples of which, multisampling, or polygon smoothing?
even with blending enabled it wont give me any antialising, and I only have one object with 4 vertices to render on a black background, shoudn’t it be smooth?
An Example for GL_POLYGON_SMOOTH or the one that is easier to use
AFAICT, it doesn’t seem to be supported in recent hardware. It’s hard to find any details on when they were dropped. But here’s a couple of links I found:
Thanks again for all the time, but it seems to hard to use it in my code, I thought it was simpler and just need to call a function for polygon smooth
I’ve tried to read all the articles but most of them didn’t wotk and the otheres were to hard to implement
But I know that my graphics card have antialiasing because of another library that uses opengl wich can make it at 2 and 4 times
It’s harder to implement multi-sampling initially, due to WGL being a pain, but all you need to do once it’s set up, is enable/disable GL_MULTISAMPLE, whereas GL_POLYGON_SMOOTH requires further sorting etc of your scene objects.
If you’re using an OpenGL helper library, it’s typically just a case of setting a couple of properties at context creation time, but if you choose to do it yourself, you will need to do something like this in MS Windows (since you are only allowed to call SetPixelFormat once for a window):
Create temporary window
Choose/Set OpenGL compatible pixel format
Create temporary context + make current
Retrieve OpenGL extensions used for context creation/multisampling
Also, it’s usually possible to override multisample settings in your graphics card driver control panel. If the multisample demo is having no effect, check these settings. Usually there are options to force it on/off or let applications decide.