Hello,
 
im sorry to keep asking for help but im totaly stuck on trying to draw prmitive geometry to a 2D ortho screen in OSG.
 
Ive been experimenting with both the OSGhud and OSG geometry examples an i have just ended up with a huge mess, with no visible results.
 
 
I have taken the OSG geometry example and i can compile and run it fine and see the lines and polygons.  I have then converted the viewer camera to a 2Dorth projection matrix, but in doing so i get no geomtry visible. In addition it seems the gemoetry example is still rendering the geomtry in 3d space with Vec3 required for the vertex points,
but in the native opengl examples i have seen on the net they use Vec2 for simple X,Y.
 
this is the original main code from the OSG geometry example
 

int main(int, char **)

{

// create the model

osg::Group* root = new osg::Group;

root->addChild( createScene() );

root->addChild( createBackground() );

//osgDB::writeNodeFile(*root,"geoemtry.osg");

osgViewer::Viewer viewer;

// add model to viewer.

viewer.setSceneData( root );

return viewer.run();

}

 

can any help me by showing how the viewer camera can be set to 2D orth, no quad, no background,so that one can still see the geometry rendered on screen.

 

Everytime i set it to 2D ortho no geometry is ever visible.

 

 

Any help appreciated, im tearing my hair out, and have no idea what to try next.

 
 
 
Thanks

Peter DeSantis
[EMAIL PROTECTED]
Jumbo Vision International Pty Ltd
Unit 2 ,1 Aitken Way
Kewdale WA 6105
Australia

Tel: 61 8 9353 6200
Fax: 61 8 9353 6211
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to