[Qt-3d] Multisampling on QtQuick3D
Farid Bouchaib
farid.bouchaib at gmail.com
Fri Jun 29 14:51:43 CEST 2012
Hi,
I know that it's possible to activate multisampling on the C++ API.
But I would want to know if it's possible to exposed it on QML for the
Viewport.
In fact there is aliasing on my 3D object render via QtQuick3D.
*I have created a QtQuick application to have C++ and QML and tryed this on
the main.cpp:*
QmlApplicationViewer viewer;
QGLFormat fmt = QGLFormat::defaultFormat();
fmt.setDoubleBuffer(true);
fmt.setDirectRendering(true);
fmt.setSampleBuffers(true);
GLWidget *_glWidget = new GLWidget(fmt);// setFormat(fmt); on the
constructor
viewer.setViewport(_glWidget);
viewer.setMainQmlFile(QLatin1String("qml/main.qml"));
*
I have a qlwidget.cpp (inherits of QGLWidget) with this constructor:*
GLWidget::GLWidget(QGLFormat fmt)
{
setFormat(fmt);
}
void GLWidget::initializeGL()
{
qglClearColor(Qt::red); // don't work
glEnable(GL_POINT_SMOOTH);
glEnable(GL_LINE_SMOOTH);
glEnable(GL_POLYGON_SMOOTH);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glEnable(GL_BLEND);
}
This doesn't work and even the "qglClearColor(Qt::red);" on the
"initializeGL()" function, don't work => I don't have a red background on
my viewport.
I use Qt 4.8.1 on Windows XP 64 and QtQuick3D with MSVC.
Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-3d/attachments/20120629/91caf477/attachment.html
More information about the Qt-3d
mailing list