Changeset 10283

Show
Ignore:
Timestamp:
05/28/09 15:29:20 (6 years ago)
Author:
robert
Message:

From Gregory Jaegy and Robert Osfield, added support for static linking of OpenFlight? plugin

Location:
OpenSceneGraph/trunk/src/osgPlugins/OpenFlight
Files:
11 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/AncillaryRecords.cpp

    r9067 r10283  
    8585}; 
    8686 
    87 RegisterRecordProxy<Comment>    g_Comment(COMMENT_OP); 
     87REGISTER_FLTRECORD(Comment, COMMENT_OP) 
     88 
    8889 
    8990 
     
    112113}; 
    113114 
    114 RegisterRecordProxy<LongID> g_LongID(LONG_ID_OP); 
     115REGISTER_FLTRECORD(LongID, LONG_ID_OP) 
     116 
    115117 
    116118 
     
    151153}; 
    152154 
    153 RegisterRecordProxy<Matrix> g_Matrix(MATRIX_OP); 
     155REGISTER_FLTRECORD(Matrix, MATRIX_OP) 
     156 
    154157 
    155158 
     
    229232}; 
    230233 
    231 RegisterRecordProxy<Multitexture> g_Multitexture(MULTITEXTURE_OP); 
     234REGISTER_FLTRECORD(Multitexture, MULTITEXTURE_OP) 
     235 
    232236 
    233237 
     
    285289}; 
    286290 
    287 RegisterRecordProxy<UVList> g_UVList(UV_LIST_OP); 
     291REGISTER_FLTRECORD(UVList, UV_LIST_OP) 
    288292 
    289293 
     
    311315}; 
    312316 
    313 RegisterRecordProxy<Replicate> g_Replicate(REPLICATE_OP); 
    314  
     317REGISTER_FLTRECORD(Replicate, REPLICATE_OP) 
    315318 
    316319// Prevent "unknown record" message for the following ancillary records: 
    317 RegisterRecordProxy<DummyRecord> g_OldTranslate(OLD_TRANSLATE2_OP); 
    318 RegisterRecordProxy<DummyRecord> g_OldRotateAboutPoint(OLD_ROTATE_ABOUT_POINT_OP); 
    319 RegisterRecordProxy<DummyRecord> g_OldRotateAboutEdge(OLD_ROTATE_ABOUT_EDGE_OP); 
    320 RegisterRecordProxy<DummyRecord> g_OldScale(OLD_SCALE_OP); 
    321 RegisterRecordProxy<DummyRecord> g_OldTranslate2(OLD_TRANSLATE_OP); 
    322 RegisterRecordProxy<DummyRecord> g_OldNonuniformScale(OLD_NONUNIFORM_SCALE_OP); 
    323 RegisterRecordProxy<DummyRecord> g_OldRotateAboutPoint2(OLD_ROTATE_ABOUT_POINT2_OP); 
    324 RegisterRecordProxy<DummyRecord> g_OldRotateScaleToPoint(OLD_ROTATE_SCALE_TO_POINT_OP); 
    325 RegisterRecordProxy<DummyRecord> g_OldPutTransform(OLD_PUT_TRANSFORM_OP); 
    326 RegisterRecordProxy<DummyRecord> g_OldBoundingBox(OLD_BOUNDING_BOX_OP); 
    327 RegisterRecordProxy<DummyRecord> g_IndexedString(INDEXED_STRING_OP); 
    328 RegisterRecordProxy<DummyRecord> g_RoadZone(ROAD_ZONE_OP); 
    329 RegisterRecordProxy<DummyRecord> g_RotateAboutEdge(ROTATE_ABOUT_EDGE_OP); 
    330 RegisterRecordProxy<DummyRecord> g_Translate(TRANSLATE_OP); 
    331 RegisterRecordProxy<DummyRecord> g_Scale(NONUNIFORM_SCALE_OP); 
    332 RegisterRecordProxy<DummyRecord> g_RotateAboutPoint(ROTATE_ABOUT_POINT_OP); 
    333 RegisterRecordProxy<DummyRecord> g_RotateScaleToPoint(ROTATE_SCALE_TO_POINT_OP); 
    334 RegisterRecordProxy<DummyRecord> g_PutTransform(PUT_TRANSFORM_OP); 
    335 RegisterRecordProxy<DummyRecord> g_GeneralMatrix(GENERAL_MATRIX_OP); 
    336 RegisterRecordProxy<DummyRecord> g_Vector(VECTOR_OP); 
    337 RegisterRecordProxy<DummyRecord> g_BoundingBox(BOUNDING_BOX_OP); 
    338 RegisterRecordProxy<DummyRecord> g_BoundingSphere(BOUNDING_SPHERE_OP); 
    339 RegisterRecordProxy<DummyRecord> g_BoundingCylinder(BOUNDING_CYLINDER_OP); 
    340 RegisterRecordProxy<DummyRecord> g_BoundingConvexHull(BOUNDING_CONVEX_HULL_OP); 
    341 RegisterRecordProxy<DummyRecord> g_BoundingHistogram(BOUNDING_HISTOGRAM); 
    342 RegisterRecordProxy<DummyRecord> g_BoundingVolumeCenter(BOUNDING_VOLUME_CENTER_OP); 
    343 RegisterRecordProxy<DummyRecord> g_BoundingVolumeOrientation(BOUNDING_VOLUME_ORIENTATION_OP); 
    344 RegisterRecordProxy<DummyRecord> g_HistogramBoundingVolume(HISTOGRAM_BOUNDING_VOLUME_OP); 
     320REGISTER_FLTRECORD(DummyRecord, OLD_TRANSLATE2_OP) 
     321REGISTER_FLTRECORD(DummyRecord, OLD_ROTATE_ABOUT_POINT_OP) 
     322REGISTER_FLTRECORD(DummyRecord, OLD_ROTATE_ABOUT_EDGE_OP) 
     323REGISTER_FLTRECORD(DummyRecord, OLD_SCALE_OP) 
     324REGISTER_FLTRECORD(DummyRecord, OLD_TRANSLATE_OP) 
     325REGISTER_FLTRECORD(DummyRecord, OLD_NONUNIFORM_SCALE_OP) 
     326REGISTER_FLTRECORD(DummyRecord, OLD_ROTATE_ABOUT_POINT2_OP) 
     327REGISTER_FLTRECORD(DummyRecord, OLD_ROTATE_SCALE_TO_POINT_OP) 
     328REGISTER_FLTRECORD(DummyRecord, OLD_PUT_TRANSFORM_OP) 
     329REGISTER_FLTRECORD(DummyRecord, OLD_BOUNDING_BOX_OP) 
     330REGISTER_FLTRECORD(DummyRecord, INDEXED_STRING_OP) 
     331REGISTER_FLTRECORD(DummyRecord, ROAD_ZONE_OP) 
     332REGISTER_FLTRECORD(DummyRecord, ROTATE_ABOUT_EDGE_OP) 
     333REGISTER_FLTRECORD(DummyRecord, TRANSLATE_OP) 
     334REGISTER_FLTRECORD(DummyRecord, NONUNIFORM_SCALE_OP) 
     335REGISTER_FLTRECORD(DummyRecord, ROTATE_ABOUT_POINT_OP) 
     336REGISTER_FLTRECORD(DummyRecord, ROTATE_SCALE_TO_POINT_OP) 
     337REGISTER_FLTRECORD(DummyRecord, PUT_TRANSFORM_OP) 
     338REGISTER_FLTRECORD(DummyRecord, GENERAL_MATRIX_OP) 
     339REGISTER_FLTRECORD(DummyRecord, VECTOR_OP) 
     340REGISTER_FLTRECORD(DummyRecord, BOUNDING_BOX_OP) 
     341REGISTER_FLTRECORD(DummyRecord, BOUNDING_SPHERE_OP) 
     342REGISTER_FLTRECORD(DummyRecord, BOUNDING_CYLINDER_OP) 
     343REGISTER_FLTRECORD(DummyRecord, BOUNDING_CONVEX_HULL_OP) 
     344REGISTER_FLTRECORD(DummyRecord, BOUNDING_HISTOGRAM) 
     345REGISTER_FLTRECORD(DummyRecord, BOUNDING_VOLUME_CENTER_OP) 
     346REGISTER_FLTRECORD(DummyRecord, BOUNDING_VOLUME_ORIENTATION_OP) 
     347REGISTER_FLTRECORD(DummyRecord, HISTOGRAM_BOUNDING_VOLUME_OP) 
     348 
    345349 
    346350} // end namespace 
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/ControlRecords.cpp

    r7859 r10283  
    4949}; 
    5050 
    51 RegisterRecordProxy<PushLevel> g_PushLevel(PUSH_LEVEL_OP); 
     51REGISTER_FLTRECORD(PushLevel, PUSH_LEVEL_OP) 
     52 
    5253 
    5354 
     
    8788}; 
    8889 
    89 RegisterRecordProxy<PopLevel> g_PopLevel(POP_LEVEL_OP); 
     90REGISTER_FLTRECORD(PopLevel, POP_LEVEL_OP) 
     91 
    9092 
    9193 
     
    110112}; 
    111113 
    112 RegisterRecordProxy<PushSubface> g_PushSubface(PUSH_SUBFACE_OP); 
     114REGISTER_FLTRECORD(PushSubface, PUSH_SUBFACE_OP) 
     115 
    113116 
    114117 
     
    133136}; 
    134137 
    135 RegisterRecordProxy<PopSubface> g_PopSubface(POP_SUBFACE_OP); 
     138REGISTER_FLTRECORD(PopSubface, POP_SUBFACE_OP) 
     139 
    136140 
    137141 
     
    157161}; 
    158162 
    159 RegisterRecordProxy<PushExtension> g_PushExtension(PUSH_EXTENSION_OP); 
     163REGISTER_FLTRECORD(PushExtension, PUSH_EXTENSION_OP) 
     164 
    160165 
    161166 
     
    181186}; 
    182187 
    183 RegisterRecordProxy<PopExtension> g_PopExtension(POP_EXTENSION_OP); 
     188REGISTER_FLTRECORD(PopExtension, POP_EXTENSION_OP) 
     189 
    184190 
    185191 
     
    204210}; 
    205211 
    206 RegisterRecordProxy<PushAttribute> g_PushAttribute(PUSH_ATTRIBUTE_OP); 
     212REGISTER_FLTRECORD(PushAttribute, PUSH_ATTRIBUTE_OP) 
     213 
    207214 
    208215 
     
    227234}; 
    228235 
    229 RegisterRecordProxy<PopAttribute> g_PopAttribute(POP_ATTRIBUTE_OP); 
     236REGISTER_FLTRECORD(PopAttribute, POP_ATTRIBUTE_OP) 
     237 
    230238 
    231239 
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/GeometryRecords.cpp

    r10084 r10283  
    537537}; 
    538538 
    539 RegisterRecordProxy<Face> g_Face(FACE_OP); 
     539REGISTER_FLTRECORD(Face, FACE_OP) 
     540 
    540541 
    541542 
     
    593594 
    594595 
    595 RegisterRecordProxy<VertexListRecord> g_VertexList(VERTEX_LIST_OP); 
     596REGISTER_FLTRECORD(VertexListRecord, VERTEX_LIST_OP) 
     597 
    596598 
    597599 
     
    682684}; 
    683685 
    684 RegisterRecordProxy<MorphVertexList> g_MorphVertexList(MORPH_VERTEX_LIST_OP); 
     686REGISTER_FLTRECORD(MorphVertexList, MORPH_VERTEX_LIST_OP) 
     687 
    685688 
    686689 
     
    10171020}; 
    10181021 
    1019 RegisterRecordProxy<Mesh> g_Mesh(MESH_OP); 
     1022REGISTER_FLTRECORD(Mesh, MESH_OP) 
     1023 
    10201024 
    10211025 
     
    11341138}; 
    11351139 
    1136 RegisterRecordProxy<LocalVertexPool> g_LocalVertexPool(LOCAL_VERTEX_POOL_OP); 
     1140REGISTER_FLTRECORD(LocalVertexPool, LOCAL_VERTEX_POOL_OP) 
     1141 
    11371142 
    11381143 
     
    12721277}; 
    12731278 
    1274 RegisterRecordProxy<MeshPrimitive> g_MeshPrimitive(MESH_PRIMITIVE_OP); 
     1279REGISTER_FLTRECORD(MeshPrimitive, MESH_PRIMITIVE_OP) 
     1280 
    12751281 
    12761282 
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/LightPointRecords.cpp

    r9382 r10283  
    235235}; 
    236236 
    237 RegisterRecordProxy<LightPoint> g_LightPoint(LIGHT_POINT_OP); 
     237REGISTER_FLTRECORD(LightPoint, LIGHT_POINT_OP) 
     238 
    238239 
    239240 
     
    417418}; 
    418419 
    419 RegisterRecordProxy<IndexedLightPoint> g_IndexedLightPoint(INDEXED_LIGHT_POINT_OP); 
     420REGISTER_FLTRECORD(IndexedLightPoint, INDEXED_LIGHT_POINT_OP) 
     421 
    420422 
    421423 
     
    509511}; 
    510512 
    511 RegisterRecordProxy<LightPointSystem> g_LightPointSystem(LIGHT_POINT_SYSTEM_OP); 
    512  
     513REGISTER_FLTRECORD(LightPointSystem, LIGHT_POINT_SYSTEM_OP) 
     514 
     515 
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/PaletteRecords.cpp

    r9527 r10283  
    6161}; 
    6262 
    63 RegisterRecordProxy<VertexPalette> g_VertexPalette(VERTEX_PALETTE_OP); 
     63REGISTER_FLTRECORD(VertexPalette, VERTEX_PALETTE_OP) 
     64 
    6465 
    6566 
     
    141142 
    142143 
    143 RegisterRecordProxy<ColorPalette> g_ColorPalette(COLOR_PALETTE_OP); 
     144REGISTER_FLTRECORD(ColorPalette, COLOR_PALETTE_OP) 
     145 
    144146 
    145147 
     
    161163}; 
    162164 
    163 RegisterRecordProxy<NameTable> g_NameTable(NAME_TABLE_OP); 
     165REGISTER_FLTRECORD(NameTable, NAME_TABLE_OP) 
     166 
    164167 
    165168 
     
    205208}; 
    206209 
    207 RegisterRecordProxy<MaterialPalette> g_MaterialPalette(MATERIAL_PALETTE_OP); 
     210REGISTER_FLTRECORD(MaterialPalette, MATERIAL_PALETTE_OP) 
     211 
    208212 
    209213 
     
    252256}; 
    253257 
    254 RegisterRecordProxy<OldMaterialPalette> g_OldMaterialPalette(OLD_MATERIAL_PALETTE_OP); 
     258REGISTER_FLTRECORD(OldMaterialPalette, OLD_MATERIAL_PALETTE_OP) 
     259 
    255260 
    256261 
     
    467472}; 
    468473 
    469 RegisterRecordProxy<TexturePalette> g_TexturePalette(TEXTURE_PALETTE_OP); 
     474REGISTER_FLTRECORD(TexturePalette, TEXTURE_PALETTE_OP) 
     475 
    470476 
    471477 
     
    485491}; 
    486492 
    487 RegisterRecordProxy<EyepointAndTrackplanePalette> g_EyepointAndTrackplanePalette(EYEPOINT_AND_TRACKPLANE_PALETTE_OP); 
     493REGISTER_FLTRECORD(EyepointAndTrackplanePalette, EYEPOINT_AND_TRACKPLANE_PALETTE_OP) 
     494 
    488495 
    489496 
     
    503510}; 
    504511 
    505 RegisterRecordProxy<LinkagePalette> g_LinkagePalette(LINKAGE_PALETTE_OP); 
     512REGISTER_FLTRECORD(LinkagePalette, LINKAGE_PALETTE_OP) 
     513 
    506514 
    507515 
     
    521529}; 
    522530 
    523 RegisterRecordProxy<SoundPalette> g_SoundPalette(SOUND_PALETTE_OP); 
     531REGISTER_FLTRECORD(SoundPalette, SOUND_PALETTE_OP) 
     532 
    524533 
    525534 
     
    600609}; 
    601610 
    602 RegisterRecordProxy<LightSourcePalette> g_LightSourcePalette(LIGHT_SOURCE_PALETTE_OP); 
     611REGISTER_FLTRECORD(LightSourcePalette, LIGHT_SOURCE_PALETTE_OP) 
     612 
    603613 
    604614 
     
    682692}; 
    683693 
    684 RegisterRecordProxy<LightPointAppearancePalette> g_LightPointAppearancePalette(LIGHT_POINT_APPEARANCE_PALETTE_OP); 
     694REGISTER_FLTRECORD(LightPointAppearancePalette, LIGHT_POINT_APPEARANCE_PALETTE_OP) 
     695 
    685696 
    686697 
     
    740751}; 
    741752 
    742 RegisterRecordProxy<LightPointAnimationPalette> g_LightPointAnimationPalette(LIGHT_POINT_ANIMATION_PALETTE_OP); 
     753REGISTER_FLTRECORD(LightPointAnimationPalette, LIGHT_POINT_ANIMATION_PALETTE_OP) 
     754 
    743755 
    744756 
     
    760772}; 
    761773 
    762 RegisterRecordProxy<LineStylePalette> g_LineStylePalette(LINE_STYLE_PALETTE_OP); 
     774REGISTER_FLTRECORD(LineStylePalette, LINE_STYLE_PALETTE_OP) 
     775 
    763776 
    764777 
     
    780793}; 
    781794 
    782 RegisterRecordProxy<TextureMappingPalette> g_TextureMappingPalette(TEXTURE_MAPPING_PALETTE_OP); 
     795REGISTER_FLTRECORD(TextureMappingPalette, TEXTURE_MAPPING_PALETTE_OP) 
     796 
    783797 
    784798 
     
    877891}; 
    878892 
    879 RegisterRecordProxy<ShaderPalette> g_ShaderPalette(SHADER_PALETTE_OP); 
     893REGISTER_FLTRECORD(ShaderPalette, SHADER_PALETTE_OP) 
     894 
    880895 
    881896} // end namespace 
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/PrimaryRecords.cpp

    r9573 r10283  
    154154}; 
    155155 
    156 RegisterRecordProxy<Header> g_Header(HEADER_OP); 
     156REGISTER_FLTRECORD(Header, HEADER_OP) 
    157157 
    158158 
     
    293293}; 
    294294 
    295 RegisterRecordProxy<Group> g_Group(GROUP_OP); 
     295REGISTER_FLTRECORD(Group, GROUP_OP) 
     296 
    296297 
    297298 
     
    458459}; 
    459460 
    460 RegisterRecordProxy<DegreeOfFreedom> g_DegreeOfFreedom(DOF_OP); 
     461REGISTER_FLTRECORD(DegreeOfFreedom, DOF_OP) 
     462 
    461463 
    462464 
     
    514516}; 
    515517 
    516 RegisterRecordProxy<LevelOfDetail> g_LevelOfDetail(LOD_OP); 
     518REGISTER_FLTRECORD(LevelOfDetail, LOD_OP) 
     519 
    517520 
    518521 
     
    570573}; 
    571574 
    572 RegisterRecordProxy<OldLevelOfDetail> g_OldLevelOfDetail(OLD_LOD_OP); 
     575REGISTER_FLTRECORD(OldLevelOfDetail, OLD_LOD_OP) 
     576 
    573577 
    574578 
     
    646650}; 
    647651 
    648 RegisterRecordProxy<Switch> g_Switch(SWITCH_OP); 
     652REGISTER_FLTRECORD(Switch, SWITCH_OP) 
     653 
    649654 
    650655 
     
    730735}; 
    731736 
    732 RegisterRecordProxy<ExternalReference> g_ExternalReference(EXTERNAL_REFERENCE_OP); 
     737REGISTER_FLTRECORD(ExternalReference, EXTERNAL_REFERENCE_OP) 
     738 
    733739 
    734740 
     
    779785}; 
    780786 
    781 RegisterRecordProxy<InstanceDefinition> g_InstanceDefinition(INSTANCE_DEFINITION_OP); 
     787REGISTER_FLTRECORD(InstanceDefinition, INSTANCE_DEFINITION_OP) 
     788 
    782789 
    783790 
     
    810817}; 
    811818 
    812 RegisterRecordProxy<InstanceReference> g_InstanceReference(INSTANCE_REFERENCE_OP); 
     819REGISTER_FLTRECORD(InstanceReference, INSTANCE_REFERENCE_OP) 
     820 
    813821 
    814822 
     
    849857}; 
    850858 
    851 RegisterRecordProxy<Extension> g_Extension(EXTENSION_OP); 
     859REGISTER_FLTRECORD(Extension, EXTENSION_OP) 
     860 
    852861 
    853862 
     
    953962}; 
    954963 
    955 RegisterRecordProxy<Object> g_Object(OBJECT_OP); 
     964REGISTER_FLTRECORD(Object, OBJECT_OP) 
     965 
    956966 
    957967 
     
    10361046}; 
    10371047 
    1038 RegisterRecordProxy<LightSource> g_LightSource(LIGHT_SOURCE_OP); 
     1048REGISTER_FLTRECORD(LightSource, LIGHT_SOURCE_OP) 
     1049 
    10391050 
    10401051 
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/ReaderWriterFLT.cpp

    r9890 r10283  
    4040using namespace osg; 
    4141using namespace osgDB; 
     42 
     43// pull in symbols from attr plugin 
     44USE_OSGPLUGIN(attr) 
     45 
     46// pull in symbols from individual .o's to enable the static build to work 
     47// note, following USE_FLTRECORD list was generated by running: 
     48// grep REGISTER_FLTRECORD * -h | grep -v "#define" | sed 's/REGISTER_FLTRECORD/USE_FLTRECORD/g' 
     49USE_FLTRECORD(Comment, COMMENT_OP) 
     50USE_FLTRECORD(LongID, LONG_ID_OP) 
     51USE_FLTRECORD(Matrix, MATRIX_OP) 
     52USE_FLTRECORD(Multitexture, MULTITEXTURE_OP) 
     53USE_FLTRECORD(UVList, UV_LIST_OP) 
     54USE_FLTRECORD(Replicate, REPLICATE_OP) 
     55USE_FLTRECORD(DummyRecord, OLD_TRANSLATE2_OP) 
     56USE_FLTRECORD(DummyRecord, OLD_ROTATE_ABOUT_POINT_OP) 
     57USE_FLTRECORD(DummyRecord, OLD_ROTATE_ABOUT_EDGE_OP) 
     58USE_FLTRECORD(DummyRecord, OLD_SCALE_OP) 
     59USE_FLTRECORD(DummyRecord, OLD_TRANSLATE_OP) 
     60USE_FLTRECORD(DummyRecord, OLD_NONUNIFORM_SCALE_OP) 
     61USE_FLTRECORD(DummyRecord, OLD_ROTATE_ABOUT_POINT2_OP) 
     62USE_FLTRECORD(DummyRecord, OLD_ROTATE_SCALE_TO_POINT_OP) 
     63USE_FLTRECORD(DummyRecord, OLD_PUT_TRANSFORM_OP) 
     64USE_FLTRECORD(DummyRecord, OLD_BOUNDING_BOX_OP) 
     65USE_FLTRECORD(DummyRecord, INDEXED_STRING_OP) 
     66USE_FLTRECORD(DummyRecord, ROAD_ZONE_OP) 
     67USE_FLTRECORD(DummyRecord, ROTATE_ABOUT_EDGE_OP) 
     68USE_FLTRECORD(DummyRecord, TRANSLATE_OP) 
     69USE_FLTRECORD(DummyRecord, NONUNIFORM_SCALE_OP) 
     70USE_FLTRECORD(DummyRecord, ROTATE_ABOUT_POINT_OP) 
     71USE_FLTRECORD(DummyRecord, ROTATE_SCALE_TO_POINT_OP) 
     72USE_FLTRECORD(DummyRecord, PUT_TRANSFORM_OP) 
     73USE_FLTRECORD(DummyRecord, GENERAL_MATRIX_OP) 
     74USE_FLTRECORD(DummyRecord, VECTOR_OP) 
     75USE_FLTRECORD(DummyRecord, BOUNDING_BOX_OP) 
     76USE_FLTRECORD(DummyRecord, BOUNDING_SPHERE_OP) 
     77USE_FLTRECORD(DummyRecord, BOUNDING_CYLINDER_OP) 
     78USE_FLTRECORD(DummyRecord, BOUNDING_CONVEX_HULL_OP) 
     79USE_FLTRECORD(DummyRecord, BOUNDING_HISTOGRAM) 
     80USE_FLTRECORD(DummyRecord, BOUNDING_VOLUME_CENTER_OP) 
     81USE_FLTRECORD(DummyRecord, BOUNDING_VOLUME_ORIENTATION_OP) 
     82USE_FLTRECORD(DummyRecord, HISTOGRAM_BOUNDING_VOLUME_OP) 
     83USE_FLTRECORD(PushLevel, PUSH_LEVEL_OP) 
     84USE_FLTRECORD(PopLevel, POP_LEVEL_OP) 
     85USE_FLTRECORD(PushSubface, PUSH_SUBFACE_OP) 
     86USE_FLTRECORD(PopSubface, POP_SUBFACE_OP) 
     87USE_FLTRECORD(PushExtension, PUSH_EXTENSION_OP) 
     88USE_FLTRECORD(PopExtension, POP_EXTENSION_OP) 
     89USE_FLTRECORD(PushAttribute, PUSH_ATTRIBUTE_OP) 
     90USE_FLTRECORD(PopAttribute, POP_ATTRIBUTE_OP) 
     91USE_FLTRECORD(Face, FACE_OP) 
     92USE_FLTRECORD(VertexListRecord, VERTEX_LIST_OP) 
     93USE_FLTRECORD(MorphVertexList, MORPH_VERTEX_LIST_OP) 
     94USE_FLTRECORD(Mesh, MESH_OP) 
     95USE_FLTRECORD(LocalVertexPool, LOCAL_VERTEX_POOL_OP) 
     96USE_FLTRECORD(MeshPrimitive, MESH_PRIMITIVE_OP) 
     97USE_FLTRECORD(LightPoint, LIGHT_POINT_OP) 
     98USE_FLTRECORD(IndexedLightPoint, INDEXED_LIGHT_POINT_OP) 
     99USE_FLTRECORD(LightPointSystem, LIGHT_POINT_SYSTEM_OP) 
     100USE_FLTRECORD(VertexPalette, VERTEX_PALETTE_OP) 
     101USE_FLTRECORD(ColorPalette, COLOR_PALETTE_OP) 
     102USE_FLTRECORD(NameTable, NAME_TABLE_OP) 
     103USE_FLTRECORD(MaterialPalette, MATERIAL_PALETTE_OP) 
     104USE_FLTRECORD(OldMaterialPalette, OLD_MATERIAL_PALETTE_OP) 
     105USE_FLTRECORD(TexturePalette, TEXTURE_PALETTE_OP) 
     106USE_FLTRECORD(EyepointAndTrackplanePalette, EYEPOINT_AND_TRACKPLANE_PALETTE_OP) 
     107USE_FLTRECORD(LinkagePalette, LINKAGE_PALETTE_OP) 
     108USE_FLTRECORD(SoundPalette, SOUND_PALETTE_OP) 
     109USE_FLTRECORD(LightSourcePalette, LIGHT_SOURCE_PALETTE_OP) 
     110USE_FLTRECORD(LightPointAppearancePalette, LIGHT_POINT_APPEARANCE_PALETTE_OP) 
     111USE_FLTRECORD(LightPointAnimationPalette, LIGHT_POINT_ANIMATION_PALETTE_OP) 
     112USE_FLTRECORD(LineStylePalette, LINE_STYLE_PALETTE_OP) 
     113USE_FLTRECORD(TextureMappingPalette, TEXTURE_MAPPING_PALETTE_OP) 
     114USE_FLTRECORD(ShaderPalette, SHADER_PALETTE_OP) 
     115USE_FLTRECORD(Header, HEADER_OP) 
     116USE_FLTRECORD(Group, GROUP_OP) 
     117USE_FLTRECORD(DegreeOfFreedom, DOF_OP) 
     118USE_FLTRECORD(LevelOfDetail, LOD_OP) 
     119USE_FLTRECORD(OldLevelOfDetail, OLD_LOD_OP) 
     120USE_FLTRECORD(Switch, SWITCH_OP) 
     121USE_FLTRECORD(ExternalReference, EXTERNAL_REFERENCE_OP) 
     122USE_FLTRECORD(InstanceDefinition, INSTANCE_DEFINITION_OP) 
     123USE_FLTRECORD(InstanceReference, INSTANCE_REFERENCE_OP) 
     124USE_FLTRECORD(Extension, EXTENSION_OP) 
     125USE_FLTRECORD(Object, OBJECT_OP) 
     126USE_FLTRECORD(LightSource, LIGHT_SOURCE_OP) 
     127USE_FLTRECORD(DummyRecord, 103) 
     128USE_FLTRECORD(DummyRecord, 104) 
     129USE_FLTRECORD(DummyRecord, 117) 
     130USE_FLTRECORD(DummyRecord, 118) 
     131USE_FLTRECORD(DummyRecord, 120) 
     132USE_FLTRECORD(DummyRecord, 121) 
     133USE_FLTRECORD(DummyRecord, 124) 
     134USE_FLTRECORD(DummyRecord, 125) 
     135USE_FLTRECORD(RoadSegment, ROAD_SEGMENT_OP) 
     136USE_FLTRECORD(RoadConstruction, ROAD_CONSTRUCTION_OP) 
     137USE_FLTRECORD(RoadPath, ROAD_PATH_OP) 
     138USE_FLTRECORD(VertexC, VERTEX_C_OP) 
     139USE_FLTRECORD(VertexCN, VERTEX_CN_OP) 
     140USE_FLTRECORD(VertexCT, VERTEX_CT_OP) 
     141USE_FLTRECORD(VertexCNT, VERTEX_CNT_OP) 
     142USE_FLTRECORD(AbsoluteVertex, OLD_ABSOLUTE_VERTEX_OP) 
     143USE_FLTRECORD(ShadedVertex, OLD_SHADED_VERTEX_OP) 
     144USE_FLTRECORD(NormalVertex, OLD_NORMAL_VERTEX_OP) 
     145 
    42146 
    43147 
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/Registry.h

    r8003 r10283  
    123123}; 
    124124 
     125////////////////////////////////////////////////////////////////////////// 
     126 
     127extern "C" 
     128{ 
     129    typedef void (* CRecordFunction) (void); 
     130} 
     131 
     132struct RecordFunctionProxy 
     133{ 
     134    RecordFunctionProxy(CRecordFunction function) { (function)(); } 
     135}; 
     136 
     137#define USE_FLTRECORD(recname, opcode) \ 
     138    extern "C" void osgfltrec_##recname_##opcode(void); \ 
     139    static flt::RecordFunctionProxy proxy_fltrecord_##recname_##opcode(osgfltrec_##recname_##opcode); 
     140 
     141#define REGISTER_FLTRECORD(recname, opcode) \ 
     142    extern "C" void osgfltrec_##recname_##opcode(void) {} \ 
     143    static flt::RegisterRecordProxy<recname> g_proxy_fltrecord_##recname_##opcode(opcode); 
     144 
     145 
    125146} // end namespace 
    126147 
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/ReservedRecords.cpp

    r7748 r10283  
    2323 
    2424// Prevent "unknown record" message for the following reserved records: 
    25 RegisterRecordProxy<DummyRecord> g_Reserved_103(103); 
    26 RegisterRecordProxy<DummyRecord> g_Reserved_104(104); 
    27 RegisterRecordProxy<DummyRecord> g_Reserved_117(117); 
    28 RegisterRecordProxy<DummyRecord> g_Reserved_118(118); 
    29 RegisterRecordProxy<DummyRecord> g_Reserved_120(120); 
    30 RegisterRecordProxy<DummyRecord> g_Reserved_121(121); 
    31 RegisterRecordProxy<DummyRecord> g_Reserved_124(124); 
    32 RegisterRecordProxy<DummyRecord> g_Reserved_125(125); 
     25REGISTER_FLTRECORD(DummyRecord, 103) 
     26REGISTER_FLTRECORD(DummyRecord, 104) 
     27REGISTER_FLTRECORD(DummyRecord, 117) 
     28REGISTER_FLTRECORD(DummyRecord, 118) 
     29REGISTER_FLTRECORD(DummyRecord, 120) 
     30REGISTER_FLTRECORD(DummyRecord, 121) 
     31REGISTER_FLTRECORD(DummyRecord, 124) 
     32REGISTER_FLTRECORD(DummyRecord, 125) 
    3333 
    3434 
    3535 
    3636 
     37 
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/RoadRecords.cpp

    r7756 r10283  
    6161}; 
    6262 
    63 RegisterRecordProxy<RoadSegment> g_RoadSegment(ROAD_SEGMENT_OP); 
     63REGISTER_FLTRECORD(RoadSegment, ROAD_SEGMENT_OP) 
    6464 
    6565 
     
    9999}; 
    100100 
    101 RegisterRecordProxy<RoadConstruction> g_RoadConstruction(ROAD_CONSTRUCTION_OP); 
     101REGISTER_FLTRECORD(RoadConstruction, ROAD_CONSTRUCTION_OP) 
     102 
    102103 
    103104 
     
    133134}; 
    134135 
    135 RegisterRecordProxy<RoadPath> g_RoadPath(ROAD_PATH_OP); 
     136REGISTER_FLTRECORD(RoadPath, ROAD_PATH_OP) 
     137 
    136138 
    137139 
  • OpenSceneGraph/trunk/src/osgPlugins/OpenFlight/VertexRecords.cpp

    r8563 r10283  
    7777}; 
    7878 
    79 RegisterRecordProxy<VertexC> g_VertexC(VERTEX_C_OP); 
     79REGISTER_FLTRECORD(VertexC, VERTEX_C_OP) 
     80 
    8081 
    8182 
     
    116117}; 
    117118 
    118 RegisterRecordProxy<VertexCN> g_VertexCN(VERTEX_CN_OP); 
     119REGISTER_FLTRECORD(VertexCN, VERTEX_CN_OP) 
     120 
    119121 
    120122 
     
    155157}; 
    156158 
    157 RegisterRecordProxy<VertexCT> g_VertexCT(VERTEX_CT_OP); 
     159REGISTER_FLTRECORD(VertexCT, VERTEX_CT_OP) 
     160 
    158161 
    159162 
     
    212215}; 
    213216 
    214 RegisterRecordProxy<VertexCNT> g_VertexCNT(VERTEX_CNT_OP); 
     217REGISTER_FLTRECORD(VertexCNT, VERTEX_CNT_OP) 
     218 
    215219 
    216220 
     
    253257}; 
    254258 
    255 RegisterRecordProxy<AbsoluteVertex> g_AbsoluteVertex(OLD_ABSOLUTE_VERTEX_OP); 
     259REGISTER_FLTRECORD(AbsoluteVertex, OLD_ABSOLUTE_VERTEX_OP) 
     260 
    256261 
    257262 
     
    301306}; 
    302307 
    303 RegisterRecordProxy<ShadedVertex> g_ShadedVertex(OLD_SHADED_VERTEX_OP); 
     308REGISTER_FLTRECORD(ShadedVertex, OLD_SHADED_VERTEX_OP) 
     309 
    304310 
    305311 
     
    349355}; 
    350356 
    351 RegisterRecordProxy<NormalVertex> g_NormalVertex(OLD_NORMAL_VERTEX_OP); 
     357REGISTER_FLTRECORD(NormalVertex, OLD_NORMAL_VERTEX_OP) 
     358 
    352359 
    353360} // end namespace