How to use EGLFS platform plugin with a VNC server ?



  • Hello,
    I work with a IMX6 for a Embedded Linux ARM (armv7).
    I would like to start my app Qt5.9 with the EGLFS platform plugin and a VNC server.
    When I run my program, I get this error :

    ~# ./testQtArm -platform vnc
    This plugin does not support createPlatformOpenGLContext!
    Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile))
    Aborted
    

    And this is the qtbase's configure (backends)

    QPA backends:
      DirectFB ............................... no
      EGLFS .................................. yes
      EGLFS details:
        EGLFS i.Mx6 .......................... yes
        EGLFS i.Mx6 Wayland .................. no
        EGLFS EGLDevice ...................... no
        EGLFS GBM ............................ yes
        EGLFS Mali ........................... no
        EGLFS Raspberry Pi ................... no
        EGL on X11 ........................... no
      LinuxFB ................................ yes
      VNC .................................... yes
      Mir client ............................. no
    

    I can't use X11 with x11vnc. I must use EGLFS.

    Please help me !



  • I have this error only when my Qt project use qml (QtQuick2).
    If I use qtWidget I don't get error (qtWidget don't use OpenGl).


  • Moderators

    @S.-Carretero
    maybe this thread is helpful for you



  • When I use eglfs's platform plugin without server vnc I get this :

    root@Visio:~# export QSG_INFO=1
    root@Visio:~# ./testQtArm -platform eglfs
    QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
    qt.scenegraph.general: threaded render loop
    qt.scenegraph.general: Using sg animation driver
    qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
    qt.scenegraph.general: Using sg animation driver
    qt.scenegraph.general: Animation Driver: using vsync: 16.67 ms
    qt.scenegraph.general: texture atlas dimensions: 1024x512
    qt.scenegraph.general: R/G/B/A Buffers:    4 4 4 0
    qt.scenegraph.general: Depth Buffer:       24
    qt.scenegraph.general: Stencil Buffer:     8
    qt.scenegraph.general: Samples:            0
    qt.scenegraph.general: GL_VENDOR:          Vivante Corporation
    qt.scenegraph.general: GL_RENDERER:        Vivante GC2000
    qt.scenegraph.general: GL_VERSION:         OpenGL ES 3.0 V5.0.11.p7.33433
    qt.scenegraph.general: GL_EXTENSIONS:      GL_OES_depth32 GL_EXT_frag_depth GL_OES_element_index_uint GL_OES_EGL_sync GL_OES_depth24 GL_VIV_direct_texture GL_OES_compressed_paletted_texture GL_OES_depth_texture GL_EXT_multisampled_render_to_texture GL_OES_vertex_half_float GL_OES_depth_texture_cube_map GL_OES_fragment_precision_high GL_OES_standard_derivatives GL_EXT_robustness GL_EXT_blend_minmax GL_EXT_texture_type_2_10_10_10_REV GL_EXT_texture_format_BGRA8888 GL_EXT_multi_draw_arrays GL_EXT_read_format_bgra GL_OES_compressed_ETC1_RGB8_texture GL_OES_vertex_array_object GL_EXT_discard_framebuffer GL_OES_texture_npot GL_OES_packed_depth_stencil  GL_OES_mapbuffer GL_OES_rgb8_rgba8 GL_OES_fbo_render_mipmap GL_OES_required_internalformat GL_EXT_texture_filter_anisotropic GL_OES_EGL_image GL_OES_surfaceless_context GL_OES_vertex_type_10_10_10_2 GL_OES_get_program_binary
    qt.scenegraph.general: Max Texture Size:  8192
    qt.scenegraph.general: Debug context:     false
    

    And when I use VNC's platform plugin I get this error :

    root@Visio:~# ./testQtArm -platform vnc
    qt.scenegraph.general: QSG: basic render loop
    qt.scenegraph.general: Using sg animation driver
    This plugin does not support createPlatformOpenGLContext!
    Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, profile  QSurfaceFormat::OpenGLContextProfile(NoProfile))
    Aborted
    

    But twice use OpenGL for rendering backend. If I use 2D Renderer it works but Qt Quick 2D renderer has limitations (http://doc.qt.io/QtQuick2DRenderer/qtquick2drenderer-limitations.html) :

    root@Visio:~# export QMLSCENE_DEVICE=softwarecontext
    root@Visio:~# ./testQtArm -platform vnc
    qt.scenegraph.general: Loading backend "softwarecontext"
    QVncServer created on port 5900
    

    How to use VNC platform plugin with OpenGL rendering backend without error ???


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.