1
是否有一个python模块可以在OpenGL中显示UTF-8字符串?OpenGL utf-8字符串渲染
我发现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.