Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
この次の手法を実行します。
for(int light=GL_LIGHT0; light<=GL_LIGHT7; light++) glEnable(light);
常に問題なく有効にGL_LIGHT0しGL_LIGHT7ますか? #defineOpenGL ヘッダー ファイルのように、OpenGL ライトの s が常に 1 つずつ増加するかどうか疑問に思っています。
GL_LIGHT0
GL_LIGHT7
#define
はい。OpenGL 仕様では、次のことが明確に述べられています。
GL_LIGHT<n> == GL_LIGHT0 + n