Refactor all drawImage and draw3Dtex