Code involved in loading and creating textures from files