Re: [osg-users] Porting problem. 2.2 to 2.8.2 - simple HUD overlay

2010-01-19 Thread Robert Osfield
Hi Mark,

I can't think of a specific reason for the difference, perhaps a bug
fix has changed the behavior that you were once relying upon.  Does
the osghud example work for you?

My best guess right now would be that geometry is outwith the near or
far clipping planes and the OSG 2.2 and 2.8.2 have changed the way
they are maintained.  This is just clutching at straws though.

The best strategy for you might be to have a look at osghud and then
try and mimic what it's doing in your own code.

Robert.

On Tue, Jan 19, 2010 at 6:25 AM, Mark Hurry m...@dwork.com wrote:
 Hi



 I have been working for a few days on 2.8.2 to port my display system from
 2.2. The 3D is displayed as I would expect, but unfortunately my HUD overlay
 that worked in 2.2 is no longer being displayed. Anyone got any ideas? Below
 is how I setup my HUD (just a series of lines that I update each frame)



     // set the projection matrix


 pHUDCamera-setProjectionMatrix(osg::Matrix::ortho2D(HUD_screen_min_x,HUD_screen_max_x,HUD_screen_min_y,HUD_screen_max_y));



     // set the view matrix

     pHUDCamera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);

     pHUDCamera-setViewMatrix(osg::Matrix::identity());



     // only clear the depth buffer

     pHUDCamera-setClearMask(GL_DEPTH_BUFFER_BIT);



     // Make sure HUD is last thing to be render; we want it always on top

     pHUDCamera-setRenderOrder(osg::CameraNode::POST_RENDER);



     pHUDCamera-addChild( pHUDGeode );



     root-addChild( pHUDCamera ) ;



 The line data is setup using



     pHUDGeometry-setVertexArray(pHUDVertices);

     pHUDGeometry-addPrimitiveSet(new
 osg::DrawArrays(GL_LINES,0,number_of_HUD_vertices));



 I have looked through the archive but have not found a solution. So I have
 obviously missed something. Any suggestions would be much appreciated.



 I’m using XP Pro, VS2005 v8



 Thanks



 MarkH



 ___
 osg-users mailing list
 osg-users@lists.openscenegraph.org
 http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] Porting problem. 2.2 to 2.8.2 - simple HUD overlay

2010-01-18 Thread Mark Hurry
Hi

 

I have been working for a few days on 2.8.2 to port my display system from
2.2. The 3D is displayed as I would expect, but unfortunately my HUD overlay
that worked in 2.2 is no longer being displayed. Anyone got any ideas? Below
is how I setup my HUD (just a series of lines that I update each frame)

 

// set the projection matrix

 
pHUDCamera-setProjectionMatrix(osg::Matrix::ortho2D(HUD_screen_min_x,HUD_sc
reen_max_x,HUD_screen_min_y,HUD_screen_max_y));

 

// set the view matrix

pHUDCamera-setReferenceFrame(osg::Transform::ABSOLUTE_RF);

pHUDCamera-setViewMatrix(osg::Matrix::identity());

 

// only clear the depth buffer

pHUDCamera-setClearMask(GL_DEPTH_BUFFER_BIT);

 

// Make sure HUD is last thing to be render; we want it always on top

pHUDCamera-setRenderOrder(osg::CameraNode::POST_RENDER);

 

pHUDCamera-addChild( pHUDGeode );

 

root-addChild( pHUDCamera ) ;

 

The line data is setup using

 

pHUDGeometry-setVertexArray(pHUDVertices);

pHUDGeometry-addPrimitiveSet(new
osg::DrawArrays(GL_LINES,0,number_of_HUD_vertices));

 

I have looked through the archive but have not found a solution. So I have
obviously missed something. Any suggestions would be much appreciated.

 

I'm using XP Pro, VS2005 v8

 

Thanks

 

MarkH

 

___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org