Hi,

Thanks for your help. I got it working!  8)  |-)  :D 

Looks like it forgot tyo set a viewport and cameramanipulator.
Without these, apparantly it doesn't work...  :? 

Although I stripped down the code.
I think some parts of the code aren't that important, but maybe that's just my 
opinion.

Here's the stripped down code:


Code:
int main( int argc, char **argv )
{
   osg::Node *scene = osgDB::readNodeFile("d:/openscenegraph-data/cow.osg"); // 
<- Cows, planes and stuff
   
   // Viewer
   osg::ref_ptr<osgViewer::Viewer> viewer = new osgViewer::Viewer();
   viewer->setUpViewInWindow(50,50,640,480);
   viewer->getCamera()->setProjectionMatrixAsOrtho( -1000, 1000, -1000, 1000, 
-300, 300 );
   //viewer->getCamera()->setComputeNearFarMode( 
osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR ); //You can do it without 
computing. This is a matter of taste
   
   viewer->setCameraManipulator( new osgGA::TrackballManipulator );
   viewer->setSceneData( scene );

   viewer->realize();
   while( !viewer->done() )
   {
           viewer->frame();
   }

   return 0;
} 



Kudo's to David for giving me the great and useful example!
I'm very happy and satisfied with the result!  8)  8) 

Thank you!

Cheers,
Marco

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=59686#59686





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to