Fix texture rotation and texture lock.
Fixed some compiler warnings after Xcode upgrade to 4.6.