make the iOS port use the new render state code.
Merge branch 'master' into XCode4
Minor fix.