以下:
glActiveTexture(GL_TEXTURE0 + 0);
unsigned i, w;
unsigned tex_test = Memento::_LoadImageIntoTexture("ground.png", i, w);
glBindTexture(GL_TEXTURE_2D, tex_test);
glUniform1ui(program.GetUniformLocation("tex"), 0);
将运行良好,并且我期望的图像正确显示。然而...
glActiveTexture(GL_TEXTURE0 + 1);
unsigned i, w;
unsigned tex_test = Memento::_LoadImageIntoTexture("ground.png", i, w);
glBindTexture(GL_TEXTURE_2D, tex_test);
glUniform1ui(program.GetUniformLocation("tex"), 1);
当我尝试将活动纹理更改为 0 以外的任何值时,什么都不会显示。这让我发疯,因为我找不到任何解决方案,而且没有任何意义。帮助?