Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

Why is QtQuick creating multiple Open GL Render Contexts?

$
0
0
QtQuick applications creates two Open GL Render Contexts on my machine. It seems that Qt first fails to create a context. It then creates a new context which then is used by the application. The application seems to work as intended. But is this behaviour intended or is it a Qt-bug or an indication that something is wrong with my setup? Take the template QtQuick 2 application as an example: main.cpp #include <QGuiApplication> #include <QQmlApplicationEngine>   int main(int argc, char *argv[]) {     QGuiApplication app(argc, argv);       QQmlApplicationEngine engine;     engine.load(QUrl(QStringLiteral("qrc:/main.qml")));       return app.exec(); } main.qml import QtQuick 2.2 import QtQuick.Window 2.1   Window {     visible: true     width: 360     height: 360       MouseArea {         anchors.fill: parent         onClicked: {             Qt.quit();         }     }       Text {         text: qsTr("Hello World")         anchors.centerIn: parent     } } This application (standard debug build) show two Open GL contexts when debugged with gDEBugger. The info that gDEBugger gives is a little different for the two contexts. Context 1 has Pixel Format ID 4, not Double Buffered and Stencil Channel 0 while Context 2 has Pixel Format ID 12, is Double Buffered and Stencil Channel 8. Otherwise the info is the same for both contexts.

Viewing all articles
Browse latest Browse all 4972

Latest Images

Trending Articles



Latest Images