[osg-users] Setting 2D Camera in scene

2010-05-06 Thread Nitin Rangari
hi All, I am trying to set 2D Camera in scene i have write code for that pScene-getCamera()-setProjectionMatrixAsOrtho2D(-1,1,-1,1); but its coming 3D. regards, Nitin ___ osg-users mailing list

Re: [osg-users] Setting 2D Camera in scene

2010-05-06 Thread Aitor Ardanza
Hi Nitin, Try with this code: Code: // create a camera to set up the projection and model view matrices, and the subgraph to drawn in the HUD osg::Camera* camera = new osg::Camera; // set the projection matrix camera-setProjectionMatrix(osg::Matrix::ortho2D(0,width,0,height));