Added ability to construct textures from memory