PDA

View Full Version : antialiasing a scene under QGLWidget



mickey
1st September 2006, 17:26
Hi, I have a strange problem; I suppose the cause is a particulary behavoiur of QT;
In initializeGl I have this code:


......................
cout << " widget---------> " << this << endl;
printf("antialiasing");
glShadeModel(GL_SMOOTH);
glClearColor( 0.0, 0.0, 0.0, 0.0 );
glEnable(GL_DEPTH_TEST);
glEnable(GL_BLEND);
glEnable(GL_POLYGON_SMOOTH);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glHint(GL_POLYGON_SMOOTH_HINT, GL_DONT_CARE);
........................

When I launch app, in console I can read 4 print 'antialising'; I have 4 QGLWidget.....
The scene doesn't appear aliased! But I can save my scene and obtain a pixmap of this (pixmap of widget4); then, the image of pixmapping that widget appear aliased;

renderPixmap(320, 280, FALSE);
the renderPixmap I know that must do what happen when I launch my app (initialize + paintGL); why that diference? (furthermore, I can't understand the cause of those diagonal lines, but the scene is aliased!) thanks