| 10 | | return 0; |
|---|
| | 14 | osgViewer::Viewer viewer; |
|---|
| | 15 | |
|---|
| | 16 | viewer.setSceneData(osgDB::readNodeFile("glider.osg")); |
|---|
| | 17 | |
|---|
| | 18 | { |
|---|
| | 19 | // Create a graphics window origin at 100,100 size of 800, 600 |
|---|
| | 20 | // and assign it to the master camera. |
|---|
| | 21 | // Hint - use GraphicsContext::Traits to specify traits of context |
|---|
| | 22 | // - use GraphicsContext::createGraphicsContext(trais) to create context |
|---|
| | 23 | // - use Camera::setGraphicsContext(context) to assign context |
|---|
| | 24 | } |
|---|
| | 25 | |
|---|
| | 26 | if (!viewer.getCamera()->getGraphicsContext()) |
|---|
| | 27 | { |
|---|
| | 28 | std::cout<<"Please assign GraphicsContext to Viewers master Camera."<<std::endl; |
|---|
| | 29 | return 0; |
|---|
| | 30 | } |
|---|
| | 31 | |
|---|
| | 32 | return viewer.run(); |
|---|