Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-61838

Screen blink when App go out from full screen in OpenGL

    XMLWordPrintable

Details

    • Bug
    • Resolution: Incomplete
    • P3: Somewhat important
    • None
    • 5.9.0
    • GUI: OpenGL, GUI: Painting
    • None

    Description

      Hello.

      I am having trouble when my application goes to full screen and goes out.
      I have 3 displays and I am trying to use OpenGL in my application.
      For doing this I am using QApplication::setAttribute(Qt::AA_UseOpenGLES, false);
      Drivers in my system supports OpenGL ES 2.0 and every thing looks good except when app goes to full screen.

      If I use QApplication::setAttribute(Qt::AA_UseOpenGLES, true), it works propertly.
      When I select 'false' or comment this line, three of screen suffer of a awful blink when app goes to fulscreen and more than one blinks when app goes out from full screen.

      I thought it was a problem of my app, so I have created a small example to prove it:

      ------------------------------------------------------------------------------------------------------------

      C++:

      #include <QQmlApplicationEngine>

      #include <QtWidgets/QApplication>

      #include <QQuickView>

      #define QtQuickControlsApplication QApplication

      #define qApp (static_cast<QtQuickControlsApplication *>(QtQuickControlsApplication::instance()));

      int main(int argc, char *argv[])

      {

      QtQuickControlsApplication app(argc, argv);

      app.setQuitOnLastWindowClosed(true); 

      //CHANGE THIS BOOLEAN TO 'FALSE' TO REPRODUCE BLINK WHEN GO OUT FROM FULLSCREEN

      bool bANGLE_Active = false;

      QtQuickControlsApplication::setAttribute(Qt::AA_UseOpenGLES, bANGLE_Active); 

      //show QML

      QQmlApplicationEngine* pEngine = new QQmlApplicationEngine();

      pEngine->load(QUrl(QStringLiteral("qrc:/resources/ExampleFullScreen.qml"))); 

      return app.exec();

      }

      ------------------------------------------------------------------------------------------------------------

      QML:

      import QtQuick 2.0

      import QtQuick.Controls 1.4

      import QtQuick.Window 2.2 // Window.FullScreen

      import QtQuick.Controls.Styles 1.3

      import QtGraphicalEffects 1.0 

      ApplicationWindow

      {

      id: root

      objectName: "callToolBar" 

      visible: true 

      color: "yellow"

      height: 140 width: 400 

      Rectangle {

      anchors.fill: parent color: "red"

      // Centered buttons

      Row

      {

      id: buttons 

      anchors { bottom: parent.bottom; bottomMargin: 25; horizontalCenter: parent.horizontalCenter } 

      visible: true 

      width: childrenRect.width

      height: 50

      spacing: 10 

      Button

      {

      id: button2

      text: "Button change visibility"

      onClicked: { if(root.visibility !== Window.FullScreen) root.visibility = Window.FullScreen; else root.visibility = Window.Windowed; }

      }

      }

      ------------------------------------------------------------------------------------------------------------

      If bANGLE_Active = true, it works.
      if bANGLE_Active = false it blinks.

      Any ideas??

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            lagocs Laszlo Agocs
            mmonlab Miguel Montañes
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes