added option to also keep texture data in ram