Begining to code texture functions.