`glEnable(GL_MULTISAMPLE);` can result in error. As you check for the error after the call, it will report it wrong, attributing to glBindTexture.