#OpenGL(freeglut3.0.0)+Python3.7+anaconda4.5.11
##質問内容
freeglut3.0.0+pythonでglutBitmapStringを使用して、文字列の描画に挑戦しているのですが、うまくいきません。
GLError err =1182の意味について、調べたのですが、意味が解かりません。
from
1from OpenGL.GLU import * 2from OpenGL.GLUT import * 3import sys 4glDisable(GL_LIGHTING) 5 ##平行投影にする 6glMatrixMode(GL_PROJECTION) 7glPushMatrix() 8glLoadIdentity() 9gluOrtho2D(0, w, h, 0) 10glMatrixMode(GL_MODELVIEW) 11glPushMatrix() 12glLoadIdentity() 13font = GLUT_BITMAP_HELVETICA_18 14glRasterPos3d(0, 0,0)##(x,y,z)位置をスタート位置にする 15glutBitmapString(font, str("Hello Free glut Font")) 16glPopMatrix() 17glMatrixMode(GL_PROJECTION) 18glPopMatrix() 19glMatrixMode(GL_MODELVIEW)
##実行結果
GLError Traceback (most recent call last) <ipython-input-15-b201d8172412> in <module> 3 from OpenGL.GLUT import * 4 import sys ----> 5 glDisable(GL_LIGHTING) 6 ##平行投影にする 7 glMatrixMode(GL_PROJECTION) ~\Anaconda3\envs\OpenGL\lib\site-packages\OpenGL\error.py in glCheckError(self, result, baseOperation, cArguments, *args) 230 result, 231 cArguments = cArguments, --> 232 baseOperation = baseOperation, 233 ) 234 return result GLError: GLError( err = 1282, description = b'\x96\xb3\x8c\xf8\x82\xc8\x91\x80\x8d\xec', baseOperation = glDisable, cArguments = (GL_LIGHTING,) )
##参考サイト
http://slis.tsukuba.ac.jp/~fujisawa.makoto.fu/lecture/iml/text/screen_character.html
回答1件
あなたの回答
tips
プレビュー