changed interface to accept textureref, xmltree and default dataformat