Added osg::Image::set/getWriteHint() that allows images themselves to control how

they are written to disk, either inline or as an external file.  Added support for
this in the .ive plugin.  Default of WriteHint is NO_PREFERNCE, in which case it's
up to the reader/writer to decide.
This commit is contained in:
Robert Osfield
2008-09-10 11:26:30 +00:00
parent c478ad08fc
commit 45ccf11161
9 changed files with 56 additions and 10 deletions

View File

@@ -79,6 +79,15 @@ class OSG_EXPORT Image : public Object
void setFileName(const std::string& fileName);
inline const std::string& getFileName() const { return _fileName; }
enum WriteHint {
NO_PREFERENCE,
STORE_INLINE,
EXTERNAL_FILE
};
void setWriteHint(WriteHint writeHint) { _writeHint = writeHint; }
WriteHint getWriteHint() const { return _writeHint; }
enum AllocationMode {
NO_DELETE,
USE_NEW_DELETE,
@@ -307,6 +316,8 @@ class OSG_EXPORT Image : public Object
Image& operator = (const Image&) { return *this; }
std::string _fileName;
WriteHint _writeHint;
Origin _origin;