該錯誤是在第5行:glBindTexture(texture.target,texture.id)的OpenGL Pyglet 「錯誤:全局名稱 '紋理' 未定義」
1. import pyglet
2. from pyglet.gl import *
3. class CustomGroup(pyglet.graphics.Group):
4. def set_state(self):
5. glEnable(texture.target)
6. glBindTexture(texture.target, texture.id)
7. def unset_state(self):
8. glDisable(texture.target)
NameError:全局名稱 '紋理' 未定義 但我在第2行輸入它。 完整的代碼是here
任何幫助嗎? 我使用Python 2.7.3與pyglet和Ubuntu 12.04
-1,pastebins死亡,SO永遠。將代碼編輯到問題中。 – genpfault
我總是將我的pastebins設置爲永不過期,但謝謝你的提示。然而,有時你想鏈接到完整的代碼,並只顯示相關部分@genpfault – itai12345