fixes #2123 Relocation splash distorted.
Allow splash screen as an origin and do not allow splash screens to be cached and thus the poweroftwo rules don't apply.
This commit is contained in:
parent
b258bc598e
commit
9cc7508b07
@ -292,9 +292,10 @@ ModelRegistry::readImage(const string& fileName,
|
||||
Registry* registry = Registry::instance();
|
||||
ReaderWriter::ReadResult res;
|
||||
|
||||
if (cache_active) {
|
||||
const SGReaderWriterOptions* sgoptC = dynamic_cast<const SGReaderWriterOptions*>(opt);
|
||||
|
||||
if (cache_active && (!sgoptC || sgoptC->getLoadOriginHint() != SGReaderWriterOptions::LoadOriginHint::ORIGIN_SPLASH_SCREEN)) {
|
||||
if (fileExtension != "dds" && fileExtension != "gz") {
|
||||
const SGReaderWriterOptions* sgoptC = dynamic_cast<const SGReaderWriterOptions*>(opt);
|
||||
|
||||
std::string root = getPathRoot(absFileName);
|
||||
std::string prr = getPathRelative(root, absFileName);
|
||||
|
@ -45,6 +45,7 @@ public:
|
||||
ORIGIN_MODEL,
|
||||
ORIGIN_EFFECTS,
|
||||
ORIGIN_EFFECTS_NORMALIZED,
|
||||
ORIGIN_SPLASH_SCREEN,
|
||||
};
|
||||
|
||||
//SGReaderWriterOptions* cloneOptions(const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY) const { return static_cast<SGReaderWriterOptions*>(clone(copyop)); }
|
||||
|
Loading…
Reference in New Issue
Block a user