Hi Robert,

 

Apologies in advance for my ignorance here. Still trying to lean the OSG basics!

 

I am working with the OSGMFC example application, compiling under MS Visual Studio 2005. In the example it has the following code snippet in the window Create() callback function.

 

// create the window to draw to.

m_RenderSurface = new Producer::RenderSurface;

m_RenderSurface->setWindow(GetSafeHwnd());

m_RenderSurface->useBorder(false);

m_RenderSurface->setInputRectangle( Producer::RenderSurface::InputRectangle(0.0,1.0,0.0,1.0));

m_RenderSurface->fullScreen(false);

   

// create the view of the scene.

m_SceneView = new osgUtil::SceneView;

// Do SceneView set up

 

> If you don't use Producer then the Producer stats are of little use. 

 

By having a RenderSurface am I not using Producer?

How do I get to a Producer::CameraGroup from a Producer::RenderSurface?

(From trawling through the src code my assumption is that you can only get to a Producer::CameraGroup is you use osgProducer classes, such as osgProducer::Viewer)

 

Is it possible to write an OSG program without Producer? Any examples?

Do you recommend I swap from using osgUtil::SceneView to using osgProducer::Viewer? Are there any advantages to using osgUtil::SceneView?

 

On a different subject, how to I make my OSG program sync to the video vertical retrace (on Windows XP, with ATI GFX)?

Is there a way to set the desired target update rate (as you can in Performer)?

 

> If you want your own timing results you simply need to use osg::Timer and record the start/end of the update, cull and draw and do the frame stats yourself. 

 

OK. That’s fine with me, but at some point I would like to get more that just the frame rate (i.e. how many geodes/tris rendered, how many state swaps etc). How do I get this information from an osgUtil::SceneView?

 

Regards,

Andy

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield
Sent: 08 September 2006 10:08
To: osg users
Subject: Re: [osg-users] Stats display

 

Hi Andy,

On 9/8/06, Andy Preece <[EMAIL PROTECTED]> wrote:

Thanks, I was looking at the code before emailing, but I could not find away to get a Producer::CameraGroup pointer/reference from an osgUtil::SceneView.

Actually what I really need is a way to get at the Producer::CameraGroup::FrameStats information. How do I do this?


If you doin't use Producer then the Producer stats are of little use.  If you want your own timing results you simply need to use osg::Timer and record the start/end of the update, cull and draw and do the frame stats  yourself. 

Robert.


________________________________________________________________________
This e-mail has been scanned for all viruses by Star.The service is powered by MessageLabs.
________________________________________________________________________
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to