pythonOpenGL.error.NullFunctionError葡萄糖缓冲液

2024-10-01 04:44:02 发布

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

当我运行this code测试时_百万卢比在名为python deepnets的目录中。在

我搞错了。在

OpenGL.error.NullFunctionError: Attempt to call an undefined function glGenBuffers, check for bool(glGenBuffers) before calling

在谷歌之后

http://sourceforge.net/mailarchive/forum.php?thread_name=CAAT2aSMyqrGBFydWSSaZkRsR_jtbrh%2Biy9j1Zgjv-MFX95nB1g%40mail.gmail.com&forum_name=pyopengl-users

他们说:

Your code is attempting to call OpenGL-context requiring code without an OpenGL context (window). Do the glGenBuffer and similar calls within a draw callback of your windowing system (e.g. GLUT). You may also need to verify that your machine has a reasonably recent video card that supports modern OpenGL (but most do these days).

但我不太明白其中的含义。在

这是不是意味着我没有VGA卡,所以我不能原谅这个功能?在


Tags: toname目录anyourthatcontextcode
1条回答
网友
1楼 · 发布于 2024-10-01 04:44:02

如果您告诉我们您正在使用哪个Python OpenGL库,以及该程序运行在哪个平台和库上,这将有所帮助。在

OpenGL绘制三维图形。没有一个窗口和一个支持OpenGL的上下文,它不能绘制任何东西。(相当于MS Windows DC,X11 drawable,MacOS view)并且在许多图形平台(但不是所有的图形平台)上,唯一可以绘制而不会崩溃的位置是指定的paint/drawRect/update事件处理程序。尝试在OpenGL中做任何事情而没有这些,你的程序就会崩溃。在

相关问题 更多 >