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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user