start porting over texture code