[QtOpenGL] gl_blend vs MultiSampled
Hi,
I'm new in OpenGL and I made some tests with Qt example about "Aliasing".
I would like to be sure about my results.
It's seem the result of "Anti-aliasing" to be more beautiful with the "gl_blend" method
Graphic card : ATI Mobility Radeon HD 4650
my results :

I test the different settings of the drivers ATI :
- wide-tent
- box
- narrow-tent
- edge-detect
with differents samples (setSample(2/4/8))
for me the best "Anti-aliasing" is without multisampled.
Here the code for my test.
int main(int argc, char *argv[])
{
format.setSampleBuffers(false);
//format.setSamples(2);
//format.setSamples(4);
format.setSamples(8);
MyGlWindow*_glwindow= new MyGlWindow(format);
_glwindow->show();
return a.exec();
}
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QGLFormat format = QGLFormat::defaultFormat();
format.setSampleBuffers(false);
//format.setSamples(2);
//format.setSamples(4);
format.setSamples(8);
MyGlWindow*_glwindow= new MyGlWindow(format);
_glwindow->show();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
void MyGlWindow::initializeGL()
{
if(format().sampleBuffers())
{
glEnable(GL_MULTISAMPLE);
}
else
{
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glEnable (GL_LINE_SMOOTH);
glEnable (GL_POINT_SMOOTH);
glEnable (GL_POLYGON_SMOOTH);
glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
glHint (GL_POINT_SMOOTH_HINT, GL_DONT_CARE);
glHint (GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE);
}
}
void MyGlWindow::initializeGL()
{
if(format().sampleBuffers())
{
glEnable(GL_MULTISAMPLE);
}
else
{
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA);
glEnable (GL_LINE_SMOOTH);
glEnable (GL_POINT_SMOOTH);
glEnable (GL_POLYGON_SMOOTH);
glHint (GL_LINE_SMOOTH_HINT, GL_DONT_CARE);
glHint (GL_POINT_SMOOTH_HINT, GL_DONT_CARE);
glHint (GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE);
}
}
To copy to clipboard, switch view to plain text mode
To finish, is it normal that we can't get the same "anti-aliasing" result with "GL_MULTISAMPLE" ?
thx.
Bookmarks