Extracted the common stuff.
Texture code cleaned up and tested on Android (ASUS TF101 and Xperia P).