Greetings All!

This I bet should be an easy one for you all!

I'm using the MVPW routine to convert a point 3D perspective so I can display a 
marker on to my Ortho2D heads up display camera:


Code:

osg::Matrix MVPW( camera->getViewMatrix()*
camera->getProjectectionMatrix() *
camera->getViewport()->computeWindowMatrix());

osg::Vec3 posIn2D = postIn3D * MVPW;




Works Great as long as i don't resize the screen. When I do that the object 
develops a delta that moves to the right when you stretch the view width and up 
when you stretch the height down. 

In case you’re wondering the resize routine looks like this:


Code:

osg::ref_ptr< osgViwer::GraphicsWindowEnbedded > _gw; // just so you know what 
_gw is.

// this is the resize function. It works inside a child  class of QGLWidget in 
yep, good old QT!

void osgGenWidget::resizeGL( int width, int height )
{
_gw->getEventQueue()->windowResize(0,0,width, height);
_gw->resized(0,0,width,height);
resize(width,height);
}




Sorry for any code errors, I had to hand-jam this  code segment in!   

... 
Thanks!
D Glenn

------------------------
D Glenn (a.k.a David Glenn) - Moving Heaven and Earth!

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





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

Reply via email to