想要在AM5718板卡中,执行qt程序,我们的程序需要使用OpenGLES2.0硬件加速,现在遇到了问题。首先,运行了由官网SDK构建的文件系统中的qt例程,结果如下:
root@TK-AQ-REC-XJT:/usr/share/examples/opengl/hellogl2# ./hellogl2 -platform eglfs
Could not open DRM device /dev/dri/card0 (No such file or directory)
Could not open DRM device
Aborted (core dumped)
root@TK-AQ-REC-XJT:/usr/share/examples/opengl/cube# ./cube -platform eglfs
Could not open DRM device /dev/dri/card0 (No such file or directory)
Could not open DRM device
Aborted (core dumped)
然后,运行我们编写的qt程序也出现相同的错误。如下:
root@TK-AQ-REC-XJT:/usr/share/examples/opengl/hellogl2# ./hellogl2 -platform eglfs
Could not open DRM device /dev/dri/card0 (No such file or directory)
Could not open DRM device
Aborted (core dumped)
这是什么原因?
我自己的分析如下:
第一,上述程序运行时并没有连接显示屏,是这个原因吗?我在其他的板卡上也运行过通用的程序,用eglfs可以执行成功
第二,/dev/dri/card0不存在,是SGX GPU 驱动未正确加载吗?
还有一个问题,我也使用了-platform offscreen的方法,结果如下:
root@TK-AQ-REC-XJT:/usr/share/examples/opengl/cube# ./cube -platform offscreen
QOpenGLWidget is not supported on this platform.
This plugin does not support createPlatformOpenGLContext!
This plugin does not support createPlatformOpenGLContext!
QOpenGLWidget: Failed to create context
This plugin does not support createPlatformOpenGLContext!
这是说明offscreen平台不支持OpenGL吗?
能否给出这两部分的解决方法?谢谢了!!!