PyOpenGL TypeError in glutCreateWindow

时间:2019-09-19 13:58:22   收藏:0   阅读:70

使用pyopengl时,窗口标题出现TypeError的错误,查看StackOverflow得知,传入的是字符串类型需要改为如下形式:

wintitle = b"Yixn for PyOpengl"
glutCreateWindow(wintitle)

Basically you need to specify that you are passing byte data rather than a string using b‘Window Title‘

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!