Skylark wrote:
> 
> Just wondering, do you use this:
> 
> hudCamera->setProjectionResizePolicy(osg::Camera::FIXED)
> 
> It all depends on how you've set things up and how you want things to 
> behave. If you set as above, the projection will not change even if your 
> viewport changes size. This won't work if your marker in your HUD is 
> meant to follow some other object in the 3D scene, whose camera has a 
> different projection resize policy... Try the different policies and see 
> how they work for you, or check your main camera to see which policy it 
> uses (perhaps the default which is HORIZONTAL).
> 


A Good point J-S! When I was writing this hud display stuff I was fallowing the 
OSG Heads Up Display example. It's been so long ago. I'd got to see if I 
blindly added that in for some reason! I don't recall doing that or why I would 
do that! Anyway, it might be worth experimenting with that!


Skylark wrote:
> 
> On the other hand, you might have to save your 3D points somewhere and 
> reproject them when the window gets resized. You can either wire that in 
> your resizeGL function, or you can add a ResizedCallback to your 
> GraphicsContext (GraphicsWindow).
> 
> It can be a pain to get everything match up correctly, but once you 
> understand how things fit together it all makes sense. You may also want 
> to place breakpoints and inspect the projection matrices (or the result 
> of getProjectionMatrixAsOrtho(), which is easier to interpret :-) ) 
> before and after the resize, and you'll understand what's going on.
> 
> One page I like on the subject is
> 
> http://www.songho.ca/opengl/gl_projectionmatrix.html
> 
> it has nice diagrams, easy to read text and the math is well explained.
> 
> Hope this helps,
> 
> J-S
> -- 
> ______________________________________________________
> Jean-Sebastien Guay    
> http://www.cm-labs.com/
> http://whitestar02.webhop.org/
> _______________________________________________
> osg-users mailing list
> 
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> 
>  ------------------
> Post generated by Mail2Forum


Well, I check the first thing out Monday - I'm on my day off today! Let you 
know what happens! 

BTW: does anyone remember what is the Default setting for the projection 
resizing policy?

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=35421#35421





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

Reply via email to