Qt World Summit: Submit your Presentation

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

  • 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?

  • 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.

  • 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?

  • I was thinking of something like
    QOpenGLContext ctx;
    QOffscreenSurface surface;

  • 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...

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

  • Lifetime Qt Champion

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

  • 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?

Log in to reply