Changeset 9382
- Timestamp:
- 12/17/08 17:02:42 (4 years ago)
- Location:
- OpenSceneGraph/trunk/src/osgPlugins/OpenFlight
- Files:
-
- 9 modified
-
FltExportVisitor.cpp (modified) (1 diff)
-
LightPointRecords.cpp (modified) (1 diff)
-
LightSourcePaletteManager.cpp (modified) (1 diff)
-
MaterialPaletteManager.cpp (modified) (1 diff)
-
TexturePaletteManager.cpp (modified) (1 diff)
-
TexturePaletteManager.h (modified) (1 diff)
-
VertexPaletteManager.cpp (modified) (2 diffs)
-
expGeometryRecords.cpp (modified) (9 diffs)
-
expPrimaryRecords.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/FltExportVisitor.cpp
r9138 r9382 65 65 66 66 : osg::NodeVisitor( osg::NodeVisitor::TRAVERSE_ALL_CHILDREN ), 67 _fltOpt( fltOpt ), 67 68 _dos( *dos ), 68 _fltOpt( fltOpt ),69 69 _materialPalette( new MaterialPaletteManager( *fltOpt ) ), 70 70 _texturePalette( new TexturePaletteManager( *this, *fltOpt ) ), -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/LightPointRecords.cpp
r7756 r9382 378 378 int32 appearanceIndex = in.readInt32(); 379 379 int32 animationIndex = in.readInt32(); 380 int32 drawOrder =in.readInt32(); // for calligraphic lights380 /*int32 drawOrder =*/ in.readInt32(); // for calligraphic lights 381 381 382 382 LightPointAppearancePool* lpAppearancePool = document.getOrCreateLightPointAppearancePool(); -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/LightSourcePaletteManager.cpp
r8015 r9382 30 30 31 31 LightSourcePaletteManager::LightSourcePaletteManager( ExportOptions& fltOpt ) 32 : _fltOpt( fltOpt ), 33 _currIndex( -1 ) 32 : _currIndex( -1 ), 33 _fltOpt( fltOpt ) 34 34 35 { 35 36 // TODO: Pay attention to the version here(?) -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/MaterialPaletteManager.cpp
r8462 r9382 29 29 30 30 MaterialPaletteManager::MaterialPaletteManager( ExportOptions& fltOpt ) 31 : _ fltOpt( fltOpt),32 _ currIndex( -1)31 : _currIndex( -1 ), 32 _fltOpt( fltOpt ) 33 33 { 34 34 // TODO: Pay attention to the version here(?) -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/TexturePaletteManager.cpp
r8003 r9382 31 31 32 32 TexturePaletteManager::TexturePaletteManager( const FltExportVisitor& nv, const ExportOptions& fltOpt ) 33 : _ fltOpt( fltOpt),33 : _currIndex( 0 ), 34 34 _nv( nv ), 35 _ currIndex( 0)35 _fltOpt( fltOpt ) 36 36 { 37 37 } -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/TexturePaletteManager.h
r8003 r9382 46 46 47 47 protected: 48 48 49 int _currIndex; 49 50 -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/VertexPaletteManager.cpp
r9329 r9382 29 29 30 30 VertexPaletteManager::VertexPaletteManager( const ExportOptions& fltOpt ) 31 : _fltOpt( fltOpt ), 32 _currentSizeBytes( 8 ), 31 : _currentSizeBytes( 8 ), 33 32 _current( NULL ), 34 _vertices( NULL ) 33 _vertices( NULL ), 34 _fltOpt( fltOpt ) 35 35 { 36 36 } … … 224 224 const int16 sizeBytes = recordSize( recType ); 225 225 226 int16 opcode ;226 int16 opcode = 0; 227 227 switch( recType ) 228 228 { -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/expGeometryRecords.cpp
r8563 r9382 39 39 // Bit flags for multitexturing 40 40 static unsigned int LAYER_1( 0x80000000 >> 0 ); 41 #if 0 42 // unused so if'deffing out 41 43 static unsigned int LAYER_2( 0x80000000 >> 1 ); 42 44 static unsigned int LAYER_3( 0x80000000 >> 2 ); … … 45 47 static unsigned int LAYER_6( 0x80000000 >> 5 ); 46 48 static unsigned int LAYER_7( 0x80000000 >> 6 ); 47 49 #endif 48 50 49 51 … … 127 129 }; 128 130 129 const unsigned int TERRAIN_BIT = 0x80000000u >> 0;130 const unsigned int NO_COLOR_BIT = 0x80000000u >> 1;131 const unsigned int NO_ALT_COLOR_BIT = 0x80000000u >> 2;131 // const unsigned int TERRAIN_BIT = 0x80000000u >> 0; 132 // const unsigned int NO_COLOR_BIT = 0x80000000u >> 1; 133 // const unsigned int NO_ALT_COLOR_BIT = 0x80000000u >> 2; 132 134 const unsigned int PACKED_COLOR_BIT = 0x80000000u >> 3; 133 const unsigned int FOOTPRINT_BIT = 0x80000000u >> 4; // Terrain culture cutout135 // const unsigned int FOOTPRINT_BIT = 0x80000000u >> 4; // Terrain culture cutout 134 136 const unsigned int HIDDEN_BIT = 0x80000000u >> 5; 135 const unsigned int ROOFLINE_BIT = 0x80000000u >> 6; 137 // const unsigned int ROOFLINE_BIT = 0x80000000u >> 6; 138 136 139 uint32 flags( PACKED_COLOR_BIT ); 137 140 if (geode.getNodeMask() == 0) … … 176 179 177 180 178 int8 drawType ;181 int8 drawType = SOLID_NO_BACKFACE; 179 182 180 183 switch( mode ) … … 306 309 // Next four bytes: 307 310 // 15.8: two 2-byte "reserved" fields 308 // 15.9: one 4-byte "reserved" field 311 // 15.9: one 4-byte "reserved" field; 309 312 _records->writeInt16( 0 ); // Reserved 310 313 _records->writeInt16( -1 ); // Shader index … … 334 337 }; 335 338 336 const unsigned int TERRAIN_BIT = 0x80000000u >> 0;337 const unsigned int NO_COLOR_BIT = 0x80000000u >> 1;338 const unsigned int NO_ALT_COLOR_BIT = 0x80000000u >> 2;339 // const unsigned int TERRAIN_BIT = 0x80000000u >> 0; 340 //const unsigned int NO_COLOR_BIT = 0x80000000u >> 1; 341 //const unsigned int NO_ALT_COLOR_BIT = 0x80000000u >> 2; 339 342 const unsigned int PACKED_COLOR_BIT = 0x80000000u >> 3; 340 const unsigned int FOOTPRINT_BIT = 0x80000000u >> 4; // Terrain culture cutout343 //const unsigned int FOOTPRINT_BIT = 0x80000000u >> 4; // Terrain culture cutout 341 344 const unsigned int HIDDEN_BIT = 0x80000000u >> 5; 342 const unsigned int ROOFLINE_BIT = 0x80000000u >> 6;345 //const unsigned int ROOFLINE_BIT = 0x80000000u >> 6; 343 346 uint32 flags( PACKED_COLOR_BIT ); 344 347 if (geode.getNodeMask() == 0) … … 559 562 // Attribute Mask 560 563 static const unsigned int HAS_POSITION = 0x80000000u >> 0; 561 static const unsigned int HAS_COLOR_INDEX = 0x80000000u >> 1;564 // static const unsigned int HAS_COLOR_INDEX = 0x80000000u >> 1; 562 565 static const unsigned int HAS_RGBA_COLOR = 0x80000000u >> 2; 563 566 static const unsigned int HAS_NORMAL = 0x80000000u >> 3; … … 791 794 792 795 osg::Vec2 defaultCoord( 0., 0. ); 793 const osg::StateSet* ss = getCurrentStateSet();796 // const osg::StateSet* ss = getCurrentStateSet(); 794 797 for( idx=1; idx<8; idx++) 795 798 { … … 806 809 t2 = new osg::Vec2Array; 807 810 } 808 else if ( t2->getNumElements() != numVerts)811 else if (static_cast<int>(t2->getNumElements()) != numVerts) 809 812 { 810 813 std::ostringstream warning; -
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/expPrimaryRecords.cpp
r9063 r9382 88 88 89 89 static const unsigned int SAVE_VERTEX_NORMALS_BIT = 0x80000000u >> 0; 90 static const unsigned int PACKED_COLOR_MODE_BIT = 0x80000000u >> 1;91 static const unsigned int CAD_VIEW_MODE_BIT = 0x80000000u >> 2;90 //static const unsigned int PACKED_COLOR_MODE_BIT = 0x80000000u >> 1; 91 //static const unsigned int CAD_VIEW_MODE_BIT = 0x80000000u >> 2; 92 92 uint32 flags( SAVE_VERTEX_NORMALS_BIT ); 93 93
