Hi Shuxing Xiao,

I have run osgviewerQT cow.osg and get a cow that isn't quite the
correct size but not as different as yours.  osgviewerQT now uses
osgViewer::GraphicsWindowEmbedded and osgViewer::Viewer which is
probably where the difference comes from.

Could you provide full modified code to illustrate the problem you've
had with trying to override the projection matrix.

Robert.

On 6/23/07, Shuxing Xiao <[EMAIL PROTECTED]> wrote:




Hi, all:

I was using simplerviewerQT4, and everything works fine. but after upgrade
to osgviewerQT(without changing anything else), the default aspect ratio of
project matrix seem incorrect. But I don't know where to set it, I tried to
add the following code in the initializeGL() and resizeGL() method in the
ViewerQT class, but nothing changes.

"getCamera()->setProjectionMatrixAsPerspective(30.0f,
static_cast<double>(width)/static_cast<double>(height/2),
1.0, 1000.0);"



The attachments are the result of before and after the upgrade.



PS: the status and help handler in the osgviewerQT are really cool.





------------------------------------------------------------------------------

Shuxing Xiao

3rd Floor, First Teaching building,

State Key Lab of CAD&CG, Zhejiang University, Hangzhou, China

TEL: 86-13588493677

Email & MSN: [EMAIL PROTECTED]


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/


_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to