在 EGLFS 上的 QT Quick 应用程序 运行 上使用正确的颜色

Use correct colors on QT Quick application running on EGLFS

我目前正在 BeagleBone 上开发 QT Quick 应用程序。 一开始,我 运行 在 X 服务器上安装它,我获得正确颜色的方法是通过更改 xorg 配置(超级简单),但速度很慢。

Section "Screen"
    Identifier     "Screen0"
    Monitor        "Monitor0"
    Option         "ColorSpace" "RGB565"
    DefaultDepth    16
EndSection

现在我在BeagleBone上安装了显卡驱动,现在我可以运行在EGLFS平台上用硬件加速应用了,但是颜色总是不对,不知道怎么改EGL配置,我什么都试过了。

如果有任何想法可以帮助我继续这项工作,我将不胜感激。

我不确定它在 BeagleBone 上是否也一样,但在 RPi 上就像那样,

QQuickView view;
QSurfaceFormat currentSurface = view.format();
currentSurface.setRedBufferSize(8);
currentSurface.setGreenBufferSize(8);
currentSurface.setBlueBufferSize(8);
currentSurface.setAlphaBufferSize(0);
view.setFormat(currentSurface);

这样你就可以将 EGL 设置为 24 位了。

通过修改文件修复:/etc/powervr.ini:

[default]
#WindowSystem=libpvrDRMWSEGL_FRONT.so
WindowSystem=libpvrDRMWSEGL.so
DisableHWTQTextureUpload=0
ParamBufferSize=1677216
DefaultPixelFormat=RGB565