[Interest] [Qt3D] Troubles to migrate to Qt5.7rc

Oleg Evseev ev.mipt at gmail.com
Thu Jun 9 22:43:27 CEST 2016


I have the following in my app on qt 5.6:

    // FrameGraph
    QFrameGraph *frameGraph = new QFrameGraph();
    QViewport *viewport = new QViewport();
    viewport->setRect(QRectF(0.0f, 0.0f, 1.0f, 1.0f));
    viewport->setClearColor(QColor("light blue"));

    QLayerFilter *layerFilter = new QLayerFilter();
    layerFilter->setEnabled(false);
    QCameraSelector *cameraSelector = new QCameraSelector();
    cameraSelector->setCamera(m_camera);

    QClearBuffer *clearBuffer = new QClearBuffer();
    clearBuffer->setBuffers(QClearBuffer::ColorDepthBuffer);
    clearBuffer->setClearColor("light blue");

    clearBuffer->setParent(cameraSelector);
    cameraSelector->setParent(layerFilter);
    layerFilter->setParent(viewport);

    frameGraph->setActiveFrameGraph(viewport);
    this->addComponent(frameGraph);

and I change it for this in qt 5.7 and it works:

    QRenderSettings *renderSettings = new QRenderSettings();
    QRenderSurfaceSelector *renderSurfaceSelector = new
QRenderSurfaceSelector();

    QViewport *viewport = new QViewport();
    viewport->setNormalizedRect(QRectF(0.0f, 0.0f, 1.0f, 1.0f));

    QLayerFilter *layerFilter = new QLayerFilter();
    layerFilter->setEnabled(false);
    QCameraSelector *cameraSelector = new QCameraSelector();
    cameraSelector->setCamera(m_camera);

    QClearBuffers *clearBuffer = new QClearBuffers();
    clearBuffer->setBuffers(QClearBuffers::ColorDepthStencilBuffer);

    clearBuffer->setParent(cameraSelector);
    cameraSelector->setParent(layerFilter);
    layerFilter->setParent(renderSurfaceSelector);

    renderSurfaceSelector->setParent(viewport);

    renderSettings->setActiveFrameGraph(viewport);
    this->addComponent(renderSettings);

--
Regards, Oleg


2016-06-03 16:57 GMT+03:00 Xavier Bigand <xbigand at koalabs-studio.com>:

> I finally found that the QFrameGraph class was renamed as QRenderSettings.
> And now I have the following error :
> No render surface selector found in frame graph
>
> I suspect that I need few new initialisation steps with Qt 5.7
>
> --
>
> Xavier Bigand
> Développeur
>
> 66 Rue Marceau,
> 93100 Montreuil.
> +33 (0) 1 48 97 92 96
>
>
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interes
> <http://lists.qt-project.org/mailman/listinfo/interest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160609/87d0e2e1/attachment.html>


More information about the Interest mailing list