[QT eglfs后端,带没有X11 / Xorg的Mesa驱动程序

问题描述 投票:0回答:1

我试图在未安装XServer的情况下从QT 5.12运行示例应用程序之一。我正在使用Ubuntu Linux。当我使用linuxfb后端启动它时,它可以正常工作,但是mapboxgl插件不起作用(可能是由于缺少本机opengl)

但是当我以EGLFS后端启动它时

./qml_location_mapviewer -platform eglfs

失败,显示“无法初始化egl显示”

我尝试过weston / wayland合成器,-platform wayland一切也正常。为什么QT EGLFS看不到我的Intel Haswell Open GL设备,但是其他所有人都可以看到?

qt opengl intel eglfs
1个回答
0
投票

如@derhass所建议,需要重新编译QT,并首先安装所有必需的OpenGL库。

# essentials
sudo apt-get install build-essential libssl-dev python

# bluez stack (optional)
sudo apt-get install libbluetooth-dev bluetooth blueman bluez libusb-dev libdbus-1-dev bluez-hcidump bluez-tools

# OpenGL EGL support
sudo apt-get install mesa-utils libegl1-mesa libegl1-mesa-dev libgbm-dev libgbm1 libgl1-mesa-dev libgl1-mesa-dri libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev 

# assuming QT is downloaded and extracted before
cd ~/qt-everywhere-src-5.12.6
./configure -confirm-license -opensource -nomake tests -nomake examples -openssl-linked

确保您获得与此类似的EGLFS部分:

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

然后编译并安装整个程序

make
sudo make install

编译您的项目并运行它。

cd mapviewer
/usr/local/Qt-5.12.6/qmake
make
./qml_location_mapviewer -platform eglfs
© www.soinside.com 2019 - 2024. All rights reserved.