Changeset 1176
- Timestamp:
- 04/18/08 04:01:03 (3 weeks ago)
- Files:
-
- trunk/Source/Contrib/VTK/testVTK.cpp (modified) (2 diffs)
- trunk/Source/Contrib/VTK/testVTKCluster.cpp (modified) (2 diffs)
- trunk/Source/Contrib/VTK/testVTKClusterConnect.cpp (modified) (2 diffs)
- trunk/Source/System/Cluster/Base/testClusterClient.cpp (modified) (2 diffs)
- trunk/Source/System/Cluster/Base/testDynamicClusterClient.cpp (modified) (2 diffs)
- trunk/Source/System/FieldContainer/Base/OSGAttachmentContainer.cpp (modified) (4 diffs)
- trunk/Source/System/FieldContainer/Fields/OSGAttachmentMapFieldTraits.h (modified) (2 diffs)
- trunk/Source/System/NodeCores/Groups/DynamicStateGenerators/testCubemapGenerator.cpp (modified) (2 diffs)
- trunk/Source/WindowSystem/GLUT/testWindowGLUT.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Source/Contrib/VTK/testVTK.cpp
r1167 r1176 775 775 } 776 776 777 int main (int argc, char **argv)777 int doMain (int argc, char **argv) 778 778 { 779 779 osgInit(argc,argv); … … 968 968 tball.setTranslationScale(scale); 969 969 tball.setRotationCenter(tCenter); 970 971 return 0; 972 } 973 974 int main (int argc, char **argv) 975 { 976 doMain(argc, argv); 970 977 971 978 // run... 972 973 979 glutMainLoop(); 974 980 975 981 return 0; 976 982 } 977 trunk/Source/Contrib/VTK/testVTKCluster.cpp
r1167 r1176 1414 1414 } 1415 1415 1416 int main(int argc,char **argv)1416 int doMain(int argc,char **argv) 1417 1417 { 1418 1418 int i,winid; … … 1616 1616 } 1617 1617 1618 try 1619 { 1620 osgInit(argc, argv); 1621 glutInit(&argc, argv); 1622 glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE ); 1623 glutInitWindowSize(winwidth,winheight); 1624 winid = glutCreateWindow("OpenSG Cluster Client"); 1625 glutKeyboardFunc(key); 1626 glutReshapeFunc(reshape); 1627 glutDisplayFunc(display); 1628 glutMouseFunc(mouse); 1629 glutMotionFunc(motion); 1630 ract = RenderAction::create(); 1631 1632 // clear changelist from prototypes 1633 OSG::Thread::getCurrentChangeList()->clear(); 1634 1635 // create cluster window 1636 switch(type) 1637 { 1638 case 'M': 1639 multidisplay=MultiDisplayWindow::create(); 1640 clusterWindow=multidisplay; 1641 break; 1618 osgInit(argc, argv); 1619 glutInit(&argc, argv); 1620 glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE ); 1621 glutInitWindowSize(winwidth,winheight); 1622 winid = glutCreateWindow("OpenSG Cluster Client"); 1623 glutKeyboardFunc(key); 1624 glutReshapeFunc(reshape); 1625 glutDisplayFunc(display); 1626 glutMouseFunc(mouse); 1627 glutMotionFunc(motion); 1628 ract = RenderAction::create(); 1629 1630 // clear changelist from prototypes 1631 OSG::Thread::getCurrentChangeList()->clear(); 1632 1633 // create cluster window 1634 switch(type) 1635 { 1636 case 'M': 1637 multidisplay=MultiDisplayWindow::create(); 1638 clusterWindow=multidisplay; 1639 break; 1642 1640 #ifdef HAVE_SORT 1643 case 'F': 1644 sortfirst=SortFirstWindow::create(); 1645 1646 if(compose) 1647 sortfirst->setCompose(true); 1648 else 1649 sortfirst->setCompose(false); 1650 1651 clusterWindow=sortfirst; 1652 break; 1653 case 'L': 1654 sortlast=SortLastWindow::create(); 1655 1656 if(!composerType.empty()) 1641 case 'F': 1642 sortfirst=SortFirstWindow::create(); 1643 1644 if(compose) 1645 sortfirst->setCompose(true); 1646 else 1647 sortfirst->setCompose(false); 1648 1649 clusterWindow=sortfirst; 1650 break; 1651 case 'L': 1652 sortlast=SortLastWindow::create(); 1653 1654 if(!composerType.empty()) 1655 { 1656 FieldContainerPtr fcPtr = 1657 FieldContainerFactory::the()-> 1658 createFieldContainer(composerType.c_str()); 1659 ImageComposerPtr icPtr = cast 1660 _dynamic<ImageComposerPtr>(fcPtr); 1661 1662 if(icPtr != NullFC) 1657 1663 { 1658 FieldContainerPtr fcPtr =1659 FieldContainerFactory::the()->1660 createFieldContainer(composerType.c_str());1661 ImageComposerPtr icPtr = cast1662 _dynamic<ImageComposerPtr>(fcPtr);1663 1664 if(icPtr != NullFC)1665 {1666 1664 /* 1667 if(PipelineComposerPtr::dcast(icPtr) != NullFC)1668 PipelineComposerPtr::dcast(icPtr)->setTileSize(subtilesize);1669 if(BinarySwapComposerPtr::dcast(icPtr) != NullFC)1670 BinarySwapComposerPtr::dcast(icPtr)->setTileSize(subtilesize);1671 */1672 icPtr->setStatistics(info);1665 if(PipelineComposerPtr::dcast(icPtr) != NullFC) 1666 PipelineComposerPtr::dcast(icPtr)->setTileSize(subtilesize); 1667 if(BinarySwapComposerPtr::dcast(icPtr) != NullFC) 1668 BinarySwapComposerPtr::dcast(icPtr)->setTileSize(subtilesize); 1669 */ 1670 icPtr->setStatistics(info); 1673 1671 // icPtr->setShort(false); 1674 sortlast->setComposer(icPtr); 1675 } 1672 sortlast->setComposer(icPtr); 1676 1673 } 1677 clusterWindow=sortlast; 1678 break; 1674 } 1675 clusterWindow=sortlast; 1676 break; 1679 1677 #endif 1680 1678 #ifdef FRAMEINTERLEAVE 1681 case 'I':1682 frameinterleave=FrameInterleaveWindow::create();1683 clusterWindow=frameinterleave;1684 if(compose)1685 frameinterleave->setCompose(true);1686 else1687 frameinterleave->setCompose(false);1688 break;1679 case 'I': 1680 frameinterleave=FrameInterleaveWindow::create(); 1681 clusterWindow=frameinterleave; 1682 if(compose) 1683 frameinterleave->setCompose(true); 1684 else 1685 frameinterleave->setCompose(false); 1686 break; 1689 1687 #endif 1690 1688 #ifdef HAVE_SORT 1691 case 'P':1692 sortfirst=SortFirstWindow::create();1693 sortfirst->setCompose(false);1694 clusterWindow=sortfirst;1695 break;1689 case 'P': 1690 sortfirst=SortFirstWindow::create(); 1691 sortfirst->setCompose(false); 1692 clusterWindow=sortfirst; 1693 break; 1696 1694 #endif 1697 }1698 1699 if(!autostart.empty())1700 clusterWindow->editAutostart().push_back(autostart);1701 1702 for(i=0 ; i<servers.size() ; ++i)1703 clusterWindow->editServers().push_back(servers[i]);1704 switch(type)1705 {1706 case 'M':1707 multidisplay->setHServers(1708 clusterWindow->getServers().size()/rows);1709 multidisplay->setVServers(1710 rows);1711 break;1712 }1695 } 1696 1697 if(!autostart.empty()) 1698 clusterWindow->editAutostart().push_back(autostart); 1699 1700 for(i=0 ; i<servers.size() ; ++i) 1701 clusterWindow->editServers().push_back(servers[i]); 1702 switch(type) 1703 { 1704 case 'M': 1705 multidisplay->setHServers( 1706 clusterWindow->getServers().size()/rows); 1707 multidisplay->setVServers( 1708 rows); 1709 break; 1710 } 1713 1711 #ifdef FRAMEINTERLEAVE 1714 clusterWindow->setInterleave(interleave);1712 clusterWindow->setInterleave(interleave); 1715 1713 #endif 1716 1717 // create client window1718 clientWindow=GLUTWindow::create();1714 1715 // create client window 1716 clientWindow=GLUTWindow::create(); 1719 1717 // glutReshapeWindow(800,600); 1720 glutReshapeWindow(winwidth,winheight); 1721 clientWindow->setGlutId(winid); 1722 clientWindow->init(); 1723 1724 // init scene graph 1725 init(filenames); 1726 1727 // init client 1728 clusterWindow->setConnectionType(connectionType); 1729 // needs to be called before init()! 1730 clusterWindow->setConnectionParams(connectionParameters); 1731 if(clientRendering) 1732 { 1733 clusterWindow->setClientWindow(clientWindow); 1734 } 1735 clusterWindow->init(); 1736 clusterWindow->resize(winwidth,winheight); 1737 clientWindow->resize(winwidth,winheight); 1738 clusterWindow->setConnectionDestination(connectionDestination); 1739 clusterWindow->setConnectionInterface(connectionInterface); 1740 glutMainLoop(); 1741 } 1742 catch(OSG_STDEXCEPTION_NAMESPACE::exception &e) 1743 { 1744 SLOG << e.what() << std::endl; 1745 } 1718 glutReshapeWindow(winwidth,winheight); 1719 clientWindow->setGlutId(winid); 1720 clientWindow->init(); 1721 1722 // init scene graph 1723 init(filenames); 1724 1725 // init client 1726 clusterWindow->setConnectionType(connectionType); 1727 // needs to be called before init()! 1728 clusterWindow->setConnectionParams(connectionParameters); 1729 if(clientRendering) 1730 { 1731 clusterWindow->setClientWindow(clientWindow); 1732 } 1733 clusterWindow->init(); 1734 clusterWindow->resize(winwidth,winheight); 1735 clientWindow->resize(winwidth,winheight); 1736 clusterWindow->setConnectionDestination(connectionDestination); 1737 clusterWindow->setConnectionInterface(connectionInterface); 1738 1746 1739 return 0; 1747 1740 } 1748 1741 1749 1750 1751 1752 1753 1754 1742 int main(int argc,char **argv) 1743 { 1744 doMain(argc, argv); 1745 1746 glutMainLoop(); 1747 1748 return 0; 1749 } 1750 1751 1752 1753 1754 1755 1756 trunk/Source/Contrib/VTK/testVTKClusterConnect.cpp
r1167 r1176 567 567 568 568 // Initialize GLUT & OpenSG and set up the scene 569 int main(int argc, char **argv)569 int doMain(int argc, char **argv) 570 570 { 571 571 std::cout << "start a cluster server with './testClusterServer -w pipe0'\n" … … 630 630 _mgr->showAll(); 631 631 632 633 return 0; 634 } 635 636 // Initialize GLUT & OpenSG and set up the scene 637 int main(int argc, char **argv) 638 { 639 doMain(argc, argv); 640 632 641 // GLUT main loop 633 642 glutMainLoop(); trunk/Source/System/Cluster/Base/testClusterClient.cpp
r1160 r1176 932 932 } 933 933 934 int main(int argc,char **argv)934 int doMain(int argc,char **argv) 935 935 { 936 936 int i; … … 1141 1141 } 1142 1142 } 1143 try 1144 { 1145 osgInit(argc, argv); 1146 glutInit(&argc, argv); 1147 glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE ); 1148 if(winx >=0 && winy >=0) 1149 glutInitWindowPosition(winx,winy); 1150 glutInitWindowSize(winwidth,winheight); 1151 winid = glutCreateWindow("OpenSG Cluster Client"); 1152 glutKeyboardFunc(key); 1153 glutReshapeFunc(reshape); 1154 glutDisplayFunc(display); 1155 if(animate) 1156 glutIdleFunc(display); 1157 glutMouseFunc(mouse); 1158 glutMotionFunc(motion); 1159 ract = RenderAction::create(); 1143 1144 osgInit(argc, argv); 1145 glutInit(&argc, argv); 1146 glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE ); 1147 if(winx >=0 && winy >=0) 1148 glutInitWindowPosition(winx,winy); 1149 glutInitWindowSize(winwidth,winheight); 1150 winid = glutCreateWindow("OpenSG Cluster Client"); 1151 glutKeyboardFunc(key); 1152 glutReshapeFunc(reshape); 1153 glutDisplayFunc(display); 1154 if(animate) 1155 glutIdleFunc(display); 1156 glutMouseFunc(mouse); 1157 glutMotionFunc(motion); 1158 ract = RenderAction::create(); 1160 1159 #ifdef OSG_OLD_RENDER_ACTION 1161 ract->setSortTrans(true);1162 ract->setZWriteTrans(true);1163 ract->setLocalLights(true);1164 ract->setCorrectTwoSidedLighting(true);1160 ract->setSortTrans(true); 1161 ract->setZWriteTrans(true); 1162 ract->setLocalLights(true); 1163 ract->setCorrectTwoSidedLighting(true); 1165 1164 #endif 1166 1165 1167 // clear changelist from prototypes 1168 OSG::Thread::getCurrentChangeList()->clear(); 1169 1170 // create cluster window 1171 switch(type) 1172 { 1173 case 'M': 1174 multidisplay=MultiDisplayWindow::create(); 1175 clusterWindow=multidisplay; 1176 break; 1177 case 'X': 1178 balancedmultidisplay=BalancedMultiWindow::create(); 1179 clusterWindow=balancedmultidisplay; 1180 break; 1181 case 'F': 1182 sortfirst=SortFirstWindow::create(); 1183 if(compose) 1184 sortfirst->setCompose(true); 1185 else 1186 sortfirst->setCompose(false); 1187 clusterWindow=sortfirst; 1188 break; 1189 case 'L': 1190 sortlast=SortLastWindow::create(); 1191 if(!composerType.empty()) 1166 // clear changelist from prototypes 1167 OSG::Thread::getCurrentChangeList()->clear(); 1168 1169 // create cluster window 1170 switch(type) 1171 { 1172 case 'M': 1173 multidisplay=MultiDisplayWindow::create(); 1174 clusterWindow=multidisplay; 1175 break; 1176 case 'X': 1177 balancedmultidisplay=BalancedMultiWindow::create(); 1178 clusterWindow=balancedmultidisplay; 1179 break; 1180 case 'F': 1181 sortfirst=SortFirstWindow::create(); 1182 if(compose) 1183 sortfirst->setCompose(true); 1184 else 1185 sortfirst->setCompose(false); 1186 clusterWindow=sortfirst; 1187 break; 1188 case 'L': 1189 sortlast=SortLastWindow::create(); 1190 if(!composerType.empty()) 1191 { 1192 FieldContainerUnrecPtr fcPtr = 1193 FieldContainerFactory::the()-> 1194 createContainer(composerType.c_str()); 1195 ImageComposerPtr icPtr = 1196 dynamic_cast<ImageComposerPtr>(fcPtr.get()); 1197 1198 if(icPtr != NullFC) 1192 1199 { 1193 FieldContainerUnrecPtr fcPtr = 1194 FieldContainerFactory::the()-> 1195 createContainer(composerType.c_str()); 1196 ImageComposerPtr icPtr = 1197 dynamic_cast<ImageComposerPtr>(fcPtr.get()); 1198 1199 if(icPtr != NullFC) 1200 if(dynamic_cast<PipelineComposerPtr>(icPtr) != NullFC) 1200 1201 { 1201 if(dynamic_cast<PipelineComposerPtr>(icPtr) != NullFC) 1202 { 1203 if(subtilesize>0) 1204 dynamic_cast<PipelineComposerPtr>(icPtr)->setTileSize(subtilesize); 1205 dynamic_cast<PipelineComposerPtr>(icPtr)->setPipelined(pipelinedBufferRead); 1206 } 1207 if(dynamic_cast<BinarySwapComposerPtr>(icPtr) != NullFC) 1208 { 1209 if(subtilesize>0) 1210 dynamic_cast<BinarySwapComposerPtr>(icPtr)->setTileSize(subtilesize); 1211 } 1212 icPtr->setStatistics(info); 1202 if(subtilesize>0) 1203 dynamic_cast<PipelineComposerPtr>(icPtr)->setTileSize(subtilesize); 1204 dynamic_cast<PipelineComposerPtr>(icPtr)->setPipelined(pipelinedBufferRead); 1205 } 1206 if(dynamic_cast<BinarySwapComposerPtr>(icPtr) != NullFC) 1207 { 1208 if(subtilesize>0) 1209 dynamic_cast<BinarySwapComposerPtr>(icPtr)->setTileSize(subtilesize); 1210 } 1211 icPtr->setStatistics(info); 1213 1212 // icPtr->setShort(false); 1214 sortlast->setComposer(icPtr); 1215 } 1213 sortlast->setComposer(icPtr); 1216 1214 } 1217 clusterWindow=sortlast; 1218 break; 1215 } 1216 clusterWindow=sortlast; 1217 break; 1219 1218 #ifdef FRAMEINTERLEAVE 1220 case 'I':1221 frameinterleave=FrameInterleaveWindow::create();1222 clusterWindow=frameinterleave;1223 if(compose)1224 frameinterleave->setCompose(true);1225 else1226 frameinterleave->setCompose(false);1227 break;1219 case 'I': 1220 frameinterleave=FrameInterleaveWindow::create(); 1221 clusterWindow=frameinterleave; 1222 if(compose) 1223 frameinterleave->setCompose(true); 1224 else 1225 frameinterleave->setCompose(false); 1226 break; 1228 1227 #endif 1229 case 'P':1230 sortfirst=SortFirstWindow::create();1231 sortfirst->setCompose(false);1232 clusterWindow=sortfirst;1233 break;1234 }1235 1236 if(!autostart.empty())1237 clusterWindow->editAutostart().push_back(autostart);1238 1239 for(i=0 ; i<servers.size() ; ++i)1240 clusterWindow->editServers().push_back(servers[i]);1241 if(cols < 0)1242 cols = clusterWindow->getServers().size() / rows;1243 switch(type)1244 {1245 case 'M':1246 multidisplay->setHServers(cols);1247 multidisplay->setVServers(rows);1248 break;1249 case 'X':1250 balancedmultidisplay->setHServers(cols);1251 balancedmultidisplay->setVServers(rows);1228 case 'P': 1229 sortfirst=SortFirstWindow::create(); 1230 sortfirst->setCompose(false); 1231 clusterWindow=sortfirst; 1232 break; 1233 } 1234 1235 if(!autostart.empty()) 1236 clusterWindow->editAutostart().push_back(autostart); 1237 1238 for(i=0 ; i<servers.size() ; ++i) 1239 clusterWindow->editServers().push_back(servers[i]); 1240 if(cols < 0) 1241 cols = clusterWindow->getServers().size() / rows; 1242 switch(type) 1243 { 1244 case 'M': 1245 multidisplay->setHServers(cols); 1246 multidisplay->setVServers(rows); 1247 break; 1248 case 'X': 1249 balancedmultidisplay->setHServers(cols); 1250 balancedmultidisplay->setVServers(rows); 1252 1251 // balancedmultidisplay->setShowBalancing(true); 1253 balancedmultidisplay->setShowBalancing(info);1254 break;1255 }1252 balancedmultidisplay->setShowBalancing(info); 1253 break; 1254 } 1256 1255 #ifdef FRAMEINTERLEAVE 1257 clusterWindow->setInterleave(interleave);1256 clusterWindow->setInterleave(interleave); 1258 1257 #endif 1259 1258 1260 // create client window1261 clientWindow=GLUTWindow::create();1259 // create client window 1260 clientWindow=GLUTWindow::create(); 1262 1261 // glutReshapeWindow(800,600); 1263 glutReshapeWindow(winwidth,winheight); 1264 clientWindow->setGlutId(winid); 1265 clientWindow->init(); 1266 1267 // init scene graph 1268 init(filenames); 1269 1270 // init client 1271 clusterWindow->setConnectionType(connectionType); 1272 // needs to be called before init()! 1273 clusterWindow->setConnectionParams(connectionParameters); 1274 if(clientRendering) 1275 { 1276 clusterWindow->setClientWindow(clientWindow); 1277 } 1278 clusterWindow->setConnectionDestination(connectionDestination); 1279 clusterWindow->setConnectionInterface(connectionInterface); 1280 clusterWindow->init(); 1281 if(serverx > 0) 1282 clusterWindow->resize(serverx,servery); 1283 else 1284 clusterWindow->resize(winwidth,winheight); 1285 clientWindow->resize(winwidth,winheight); 1286 glutMainLoop(); 1287 } 1288 catch(OSG_STDEXCEPTION_NAMESPACE::exception &e) 1289 { 1290 SLOG << e.what() << std::endl; 1291 } 1262 glutReshapeWindow(winwidth,winheight); 1263 clientWindow->setGlutId(winid); 1264 clientWindow->init(); 1265 1266 // init scene graph 1267 init(filenames); 1268 1269 // init client 1270 clusterWindow->setConnectionType(connectionType); 1271 // needs to be called before init()! 1272 clusterWindow->setConnectionParams(connectionParameters); 1273 if(clientRendering) 1274 { 1275 clusterWindow->setClientWindow(clientWindow); 1276 } 1277 clusterWindow->setConnectionDestination(connectionDestination); 1278 clusterWindow->setConnectionInterface(connectionInterface); 1279 clusterWindow->init(); 1280 if(serverx > 0) 1281 clusterWindow->resize(serverx,servery); 1282 else 1283 clusterWindow->resize(winwidth,winheight); 1284 clientWindow->resize(winwidth,winheight); 1285 glutMainLoop(); 1286 1292 1287 return 0; 1293 1288 } 1294 1289 1295 1296 1297 1298 1299 1300 1290 int main(int argc,char **argv) 1291 { 1292 doMain(argc, argv); 1293 1294 glutMainLoop(); 1295 1296 return 0; 1297 } 1298 1299 1300 1301 1302 trunk/Source/System/Cluster/Base/testDynamicClusterClient.cpp
r1141 r1176 44 44 45 45 // Initialize GLUT & OpenSG and set up the scene 46 int main(int argc, char **argv)46 int doMain(int argc, char **argv) 47 47 { 48 48 std::cout << "start a cluster server with './testClusterServer -w pipe0'\n" … … 104 104 _mgr->showAll(); 105 105 106 // GLUT main loop 106 return 0; 107 } 108 109 int main(int argc, char **argv) 110 { 111 doMain(argc, argv); 112 107 113 glutMainLoop(); 108 114 trunk/Source/System/FieldContainer/Base/OSGAttachmentContainer.cpp
r1174 r1176 175 175 key = (UInt32 (pAttachment->getGroupId()) << 16) | binding; 176 176 177 pAttachment->addReference X();177 pAttachment->addReferenceUnrecordedX(); 178 178 179 179 pAttachment->linkParent(this, … … 190 190 FieldContainerAttachment::ParentsFieldId); 191 191 192 (*fcI).second->subReference X();192 (*fcI).second->subReferenceUnrecordedX(); 193 193 194 194 (*fcI).second = pAttachment; … … 233 233 FieldContainerAttachment::ParentsFieldId); 234 234 235 (*fcI).second->subReference X();235 (*fcI).second->subReferenceUnrecordedX(); 236 236 237 237 _sfAttachments.getValue().erase(fcI); … … 293 293 FieldContainerAttachment::ParentsFieldId); 294 294 295 (*fcI).second->subReference X();295 (*fcI).second->subReferenceUnrecordedX(); 296 296 297 297 ++fcI; trunk/Source/System/FieldContainer/Fields/OSGAttachmentMapFieldTraits.h
r1105 r1176 185 185 186 186 pMem.getValue(size); 187 188 189 FieldContainerAttachmentMap::const_iterator mapIt = 190 aMap.begin(); 191 192 FieldContainerAttachmentMap::const_iterator mapEnd = 193 aMap.begin(); 194 195 for(; mapIt != mapEnd; ++mapIt) 196 { 197 if((*mapIt).second != NullFC) 198 { 199 Thread::getCurrentChangeList()->addDelayedSubRef< 200 UnrecordedRefCountPolicy>((*mapIt).second); 201 } 202 } 203 187 204 aMap.clear(); 205 188 206 189 207 for(UInt32 i = 0; i < size; ++i) … … 196 214 197 215 key = (static_cast<UInt32>(attPtr->getGroupId()) << 16) | binding; 198 216 217 UnrecordedRefCountPolicy::addRef(attPtr); 218 199 219 aMap.insert(FieldContainerAttachmentMap::value_type(key, attPtr)); 200 220 } trunk/Source/System/NodeCores/Groups/DynamicStateGenerators/testCubemapGenerator.cpp
r1105 r1176 355 355 } 356 356 357 int main (int argc, char **argv)357 int doMain (int argc, char **argv) 358 358 { 359 359 osgInit(argc,argv); … … 581 581 tball.setRotationCenter (tCenter ); 582 582 583 584 return 0; 585 } 586 587 int main (int argc, char **argv) 588 { 589 doMain(argc, argv); 590 583 591 // run... 584 592 glutMainLoop(); 585 593 586 594 return 0; 587 595 } 588 trunk/Source/WindowSystem/GLUT/testWindowGLUT.cpp
r1105 r1176 61 61 ChunkOverrideGroupRecPtr pCOver; 62 62 63 GLUTWindowUnrecPtr gwin; 64 63 65 Trackball tball; 64 66 … … 221 223 pPoly = NullFC; 222 224 pCOver = NullFC; 225 gwin = NullFC; 223 226 224 227 delete rentravact; 225 228 226 227 228 229 osgExit(); 230 229 231 exit(0); 230 232 case 'a': … … 318 320 319 321 320 int main(int argc, char **argv)322 int init(int argc, char **argv) 321 323 { 322 324 osgInit(argc,argv); … … 514 516 std::cout << "GLUT winid: " << winid << std::endl; 515 517 516 GLUTWindowUnrecPtr gwin;517 518 518 519 GLint glvp[4]; … … 597 598 #endif 598 599 600 return 0; 601 } 602 603 int main (int argc, char **argv) 604 { 605 init(argc, argv); 606 599 607 glutMainLoop(); 600 608
