loading textures from memory

and some other stuff