0
我在看OpenGL的例子,在創建對象之前,這兩個例子遵循不同的方式。這兩個例子有什麼區別?OpenGL紋理映射glActivetexture vs glEnable
1)
glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_2D,myImg);
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D,myImg2);
2)
glEnable(GL_TEXTURE_2D);
glBindTexture(GL_TEXTURE_2D, _textureId[0]);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);