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:
Robert Osfield
2008-06-18 20:17:13 +00:00
parent 0a0034aebb
commit 45fcb25765
7 changed files with 122 additions and 27 deletions

View File

@@ -51,6 +51,7 @@
#include "Image.h"
#include "PointSprite.h"
#include "Multisample.h"
#include "Fog.h"
#include "Group.h"
@@ -1181,6 +1182,10 @@ osg::StateAttribute* DataInputStream::readStateAttribute()
attribute = new osg::Stencil();
((ive::Stencil*)(attribute))->read(this);
}
else if(attributeID == IVEFOG){
attribute = new osg::Fog();
((ive::Fog*)(attribute))->read(this);
}
else{
throw Exception("Unknown StateAttribute in StateSet::read()");
}