Save the bound texture unit so that the sampler can be updated dynamiclly.
initilization missed.
Merge pull request #7008 from visiblelight/ProgramState

Fix issue 5393