From Liang Aibin:
"1. Location: <OSG_SOURCE_ROOT>\src\osgPlugins\osg\Fog.cpp
Reason: ".osg" writter plugins output incorrected string for osg::Fog's Mode.
How to Fix:
Line 138 in Fog.cpp: case(Fog::LINEAR): return "NERVER";
Change to: case(Fog::LINEAR): return "LINEAR";
2. Location: <OSG_SOURCE_ROOT>\src\osgPlugins\ive\
Reason: ".ive" writter plugins missing to process "osg::Fog".
How to Fix:
(1). Line 86 in ReadWrite.h:
Add: #define IVEFOG 0x00001133
(2). In CMakeLists.txt
"SET(TARGET_SRC" section Add: Fog.cpp
"SET(TARGET_H" section Add: Fog.h
(3). In DataInputStream.cpp
Line 54,Add: #include "Fog.h"
Line 1185,Add: else if(attributeID == IVEFOG){
attribute = new osg::Fog();
((ive::Fog*)(attribute))->read(this);
}
(4). In DataOutputStream.cpp
Line 57,Add: #include "Fog.h"
Line 832,Add: // This is a Fog
else if(dynamic_cast<const osg::Fog*>(attribute)){
((ive::Fog*)(attribute))->write(this);
}
(5). Add newly created ive::Fog Object in Fog.h and Fog.cpp.
"
This commit is contained in:
@@ -54,6 +54,7 @@
|
||||
#include "Image.h"
|
||||
#include "PointSprite.h"
|
||||
#include "Multisample.h"
|
||||
#include "Fog.h"
|
||||
|
||||
#include "Group.h"
|
||||
#include "MatrixTransform.h"
|
||||
@@ -828,6 +829,10 @@ void DataOutputStream::writeStateAttribute(const osg::StateAttribute* attribute)
|
||||
else if(dynamic_cast<const osg::Multisample*>(attribute)){
|
||||
((ive::Multisample*)(attribute))->write(this);
|
||||
}
|
||||
// This is a Fog
|
||||
else if(dynamic_cast<const osg::Fog*>(attribute)){
|
||||
((ive::Fog*)(attribute))->write(this);
|
||||
}
|
||||
|
||||
else{
|
||||
std::string className = attribute->className();
|
||||
|
||||
Reference in New Issue
Block a user