bool OEWriteSurface(const std::string &fname, const OESurface &surf) bool OEWriteSurface(OEPlatform::oeostream &ofs, const OESurface &surf, unsigned int type)
Write surf to the surface file fname. Returns false if fname is not a valid surface file name. This will overwrite the previous file if it existed.
The overload that takes an oeostream can be used to write multiple surfaces to the same destination. Note that the format must be specified by a constant from the OESurfaceFileType namespace as the type argument. The OESurfaceFileType::Grasp format does not support this kind of use. Returns true if written successfully.