【发布时间】:2019-11-07 08:19:51
【问题描述】:
我正在使用 PyOpenGL 制作游戏,并且正在使用一些重叠的文本。如何更改OpenGL.GLUT中包含的字体的字体大小?
这就是我现在拥有的:
def blit_text(x,y,font,text,r,g,b):
blending = False
if glIsEnabled(GL_BLEND):
blending = True
glColor3f(r,g,b)
glWindowPos2f(x,y)
for ch in text:
glutBitmapCharacter(font,ctypes.c_int(ord(ch)))
if not blending:
glDisable(GL_BLEND)
blit_text(displayCenter[0] - 5,displayCenter[1] - 5,GLUT_BITMAP_TIMES_ROMAN_24,"*",0,1,0)
【问题讨论】:
标签: python opengl pygame pyopengl opengl-compat