Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Running with -platform eglfs does not clear up the screen upon application exit
Forum Updated to NodeBB v4.3 + New Features

Running with -platform eglfs does not clear up the screen upon application exit

Scheduled Pinned Locked Moved Mobile and Embedded
8 Posts 5 Posters 3.6k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Morix Dev
    wrote on last edited by
    #1

    Hello everybody,
    I am current running Qt 5.2.1 cross-compiled for TI AM335x board (Starter Kit).

    I run my application eglfs platform passing -platform eglfs on the command line.

    If I close (both kill the process of nicely close the application) then screen is not cleared and the last form of my application remain on screen... Why? Is it possible to clear the screen upon application exit?

    /Morix

    1 Reply Last reply
    0
    • A Offline
      A Offline
      agocs
      wrote on last edited by
      #2

      There's not much you can do when forcibly killing the app but nothing prevents you from doing a glClear and a swap when closing gracefully.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Morix Dev
        wrote on last edited by
        #3

        It was long time I asked so... but meanwhile I've been involved in several other projects/problems... now I am back on touch on this issue...

        @agocs: how can I perform a glClear from my code? I simply use eglfs as platform but at my level I have no visibility over all the GL-related stuff... how can I perform an explicit glClear?

        /Morix

        1 Reply Last reply
        0
        • A Offline
          A Offline
          agocs
          wrote on last edited by
          #4

          I was thinking of something like
          @
          {
          QOpenGLContext ctx;
          ctx.create();
          QOffscreenSurface surface;
          surface.setFormat(ctx.format());
          surface.create();
          ctx.makeCurrent(&surface);
          ctx.functions()->glClear(GL_COLOR_BUFFER_BIT);
          ctx.swapBuffers(&surface);
          }
          @

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Morix Dev
            wrote on last edited by
            #5

            Thanks agocs: I am just trying the approach you suggested but I still have some problems... The compiler says me:

            bq. xxx.cpp:271:22: error: 'class QOpenGLFunctions' has no member named 'glClear'

            I double-checked the Qt 5.3 documentation "here":http://qt-project.org/doc/qt-5/qopenglfunctions.html and it seems that glClear shoud be there... but it is not... even looking at the header file included with QOpenGLFunctions the function glClearisn't there at all...

            Am I missing something?

            Anyway I've tried to directly call glClear writing glClear(GL_COLOR_BUFFER_BIT) instead of ctx.functions()->glClear(GL_COLOR_BUFFER_BIT) (I do not know if it correct) but the screen isn't cleared...

            /Morix

            jsulmJ 1 Reply Last reply
            0
            • A Offline
              A Offline
              aV_V
              wrote on last edited by aV_V
              #6

              I'm having same issue. Which is the proper way to solve this?

              1 Reply Last reply
              0
              • M Morix Dev

                Thanks agocs: I am just trying the approach you suggested but I still have some problems... The compiler says me:

                bq. xxx.cpp:271:22: error: 'class QOpenGLFunctions' has no member named 'glClear'

                I double-checked the Qt 5.3 documentation "here":http://qt-project.org/doc/qt-5/qopenglfunctions.html and it seems that glClear shoud be there... but it is not... even looking at the header file included with QOpenGLFunctions the function glClearisn't there at all...

                Am I missing something?

                Anyway I've tried to directly call glClear writing glClear(GL_COLOR_BUFFER_BIT) instead of ctx.functions()->glClear(GL_COLOR_BUFFER_BIT) (I do not know if it correct) but the screen isn't cleared...

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Morix-Dev glClear() has a parameter. How do you call it? Which Qt version do you use?

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply
                0
                • T Offline
                  T Offline
                  Tirupathi Korla
                  wrote on last edited by Tirupathi Korla
                  #8

                  You can use it in aboutToQuit function which will be called before application quits.
                  will there be any console kind of thing on the screen before application is launched?

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved