无法绑定VBO-Object(未找到glGenBuffers)

时间:2018-05-23 08:39:06

标签: python opengl

我在Windows 10上使用 Python 3.5 。 我已经通过pip安装了 PyOpenGL 3.1 PyOpenGL-accelerate 3.1.2

当我的简单代码想要绑定VBO对象时

# points is just a list of points to draw triangles 
self.vb = vbo.VBO(array(self.points, "f"))

# inside draw/display-callback method
self.vb.bind()

我收到错误

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

bool(glGenBuffers)返回False

这一切都发生在

的背景下
def main(self):
    glutInit([])
    glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB)

    glutInitWindowSize(500, 500)
    glutCreateWindow("Title")

    self.init_triangle_points() # Does simple math for points to render

    glutDisplayFunc(self.display) # Binding happens in here
    self.init_gl()

    glutMainLoop()

你能帮忙吗?

0 个答案:

没有答案