kivy:模块引发了一个重要错误:“找不到匹配的GLX visual”

2024-10-03 19:27:34 发布

您现在位置:Python中文网/ 问答频道 /正文

我在beaglebone上安装了ubuntu14.04(Trusty)。我通过如下vnc会话连接到我的beaglebone black:

在Beaglebone上:vncserver:1-几何体1024x768-深度24

以下是beagle bone的Xorg配置: “监视器”部分 标识符“内置默认监视器” 尾端

Section "Device"
    Identifier      "Builtin Default fbdev Device 0"
    Driver          "modesetting"
    Option          "HWcursor"      "false"
EndSection

Section "Screen"
    Identifier      "Builtin Default fbdev Screen 0"
    Device          "Builtin Default fbdev Device 0"
    Monitor         "Builtin Default Monitor"
    DefaultDepth    24
    Option          "AddARGBGLXVisuals" "True"
EndSection

Section "ServerLayout"
    Identifier      "Builtin Default Layout"
    Screen          "Builtin Default fbdev Screen 0"
EndSection


Section "Module"
    Load            "extmod"
    Load            "glx"
EndSection

当我运行我的kivy程序时,我收到了以下信息:

^{pr2}$

我搞不懂为什么会出现错误[error][Window]无法使用pygame [ERROR][Window]模块引发了一个重要错误:“找不到匹配的GLX visual”

这是因为我正在通过vncserver运行吗?或者我的 比格板。在

我安装了以下组件:libgl1 mesa-glx:armhf libswt-glx-gtk-3-jnilibxcb-glx0:armhf libva-glx1:armhf libqt5opengl5:armhf

同样,当我执行以下操作时,我得到了关于GLX visual的相同错误:

ubuntu@arm:~$ python
Python 2.7.6 (default, Jan 12 2014, 08:42:26) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
>>> pygame.display.init()
>>> pygame.display.set_mode((640, 480), pygame.HWSURFACE|pygame.OPENGL|pygame.DOUBLEBUF)
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
pygame.error: Couldn't find matching GLX visual
>>> 
>>> pygame.version.ver
'1.9.1release'
>>> 

提前感谢您的帮助!在

更新:Stackexchange不允许我回答自己的问题。。。所以用解决方案更新我的问题:

我发现了问题。vncserver不提供gl功能,请改用x11vnc。在

x11vnc-显示:0-永久-bg-重复-nowf

我没有使用密码文件,它会抱怨这。。。但现在我可以用vnc到beagleboard并用GL运行kivy应用程序。在


Tags: defaultdevice错误sectionscreenpygamevisualidentifier
1条回答
网友
1楼 · 发布于 2024-10-03 19:27:34

作者自己回答:

I found the issue. vncserver does not give you gl capabilities, use x11vnc instead.

x11vnc -display :0 -forever -bg -repeat -nowf

I am not using a password file, and it will complain about this... but now I can vnc to my beagleboard and run kivy application with GL.

相关问题 更多 >