implement multitexturing (thanks @ptitseb)