나는 다음과 같은 코드가 있습니다OpenGL을 표시 목록 블록 glEnable (GL_COLOR_MATERIAL)
glDisable(GL_COLOR_MATERIAL);
cout<<(int)glIsEnabled(GL_COLOR_MATERIAL)<<endl;
glEnable(GL_COLOR_MATERIAL);
cout<<(int)glIsEnabled(GL_COLOR_MATERIAL)<<endl;
modelDL[t] = glGenLists(1);
glNewList(modelDL[t],GL_COMPILE);
glDisable(GL_COLOR_MATERIAL);
cout<<(int)glIsEnabled(GL_COLOR_MATERIAL)<<endl;
glEnable(GL_COLOR_MATERIAL);
cout<<(int)glIsEnabled(GL_COLOR_MATERIAL)<<endl;
것으로 나타납니다 그 표시 목록 블록 glDisable 및 glEnable의 중간에 2 줄. 이 코드의 출력은 :
0
1
1
1
상기 디스플레이리스트의 2 개 행을 삭제하는 경우가
0
1
0
1
되어야 출력 괜찮다. 디스플레이 목록에 glEnable과 glDisable을 어떻게 사용합니까?