是否有可以在 OpenGL 中显示 UTF-8 字符串的 python 模块?
我找到了 pyFTGL,但是当我运行以下代码时:
glMaterialfv(GL_FRONT, GL_AMBIENT_AND_DIFFUSE, [1, 1, 1, 1])
font = FTGL.PolygonFont("NeoTechStd-Medium.ttf")
font.FaceSize(8)
font.line_height
font.Render("Angle = ? \u03C4")
我收到此错误:
font.Render(u"Weld Head Angle = ? \u03C4")
Boost.Python.ArgumentError: Python argument types in
PolygonFont.Render(PolygonFont, unicode)
did not match C++ signature:
Render(FontWrapper<FTPolygonFont> {lvalue}, char const*, double)
Render(FontWrapper<FTPolygonFont> {lvalue}, char const*)
DEBUG:Helpers.opengl_pipe:Redrawing contents of GLArea.