support building a texture from raw data in memory