Changeset 13041 for OpenSceneGraph/trunk/src/osgPlugins/ive/StateSet.cpp
- Timestamp:
- 03/21/12 18:36:20 (15 months ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/ive/StateSet.cpp
r10762 r13041 107 107 // Code to read StateSet's properties. 108 108 id = in->readInt(); 109 109 110 110 // If the osg class is inherited by any other class we should also read this from file. 111 111 osg::Object* obj = dynamic_cast<osg::Object*>(this); … … 114 114 } 115 115 else 116 in_THROW_EXCEPTION("StateSet::read(): Could not cast this osg::StateSet to an osg::Object."); 116 in_THROW_EXCEPTION("StateSet::read(): Could not cast this osg::StateSet to an osg::Object."); 117 117 118 118 // Read render bin details. … … 121 121 std::string name = in->readString(); 122 122 switch((int)c){ 123 case 0: 124 setRenderBinDetails(num, name, osg::StateSet::INHERIT_RENDERBIN_DETAILS); 123 case 0: 124 setRenderBinDetails(num, name, osg::StateSet::INHERIT_RENDERBIN_DETAILS); 125 125 break; 126 case 1: 127 setRenderBinDetails(num, name, osg::StateSet::USE_RENDERBIN_DETAILS); 126 case 1: 127 setRenderBinDetails(num, name, osg::StateSet::USE_RENDERBIN_DETAILS); 128 128 break; 129 case 2: 130 setRenderBinDetails(num, name, osg::StateSet::OVERRIDE_RENDERBIN_DETAILS); 129 case 2: 130 setRenderBinDetails(num, name, osg::StateSet::OVERRIDE_RENDERBIN_DETAILS); 131 131 break; 132 case 3: 133 setRenderBinDetails(num, name, osg::StateSet::USE_RENDERBIN_DETAILS); 132 case 3: 133 setRenderBinDetails(num, name, osg::StateSet::USE_RENDERBIN_DETAILS); 134 134 break; 135 135 default: in_THROW_EXCEPTION("Unknown RenderBinMode in StateSet::read()"); … … 145 145 } 146 146 147 // Read state attributes 147 // Read state attributes 148 148 size = in->readInt(); 149 149 for(i=0;i<size;i++){ … … 151 151 setAttribute(attribute, (osg::StateAttribute::OverrideValue)in->readInt()); 152 152 } 153 153 154 154 // Read texture stateset mode. 155 155 int nUnits = in->readInt(); … … 178 178 if ( in->getVersion() >= VERSION_0010 ) 179 179 { 180 // Read uniforms 180 // Read uniforms 181 181 size = in->readInt(); 182 182 for(i=0;i<size;i++)
