|
Hi Don, Thank you for the
example code. It is just what I need. > To get statistics
on the scene graph, use osgUtil::Statistics. Can you point me at any
example code, or should I just follow the implementation in osgProducer\ViewerEventHandler.cpp? How to I make my OSG
program sync to the video vertical retrace (on Windows XP, with ATI GFX)? Producer::RenderSurface ->
Sync() seems to just call glFinish(). Is this sufficient? Is there a way to set the
desired target update rate (as you can in Performer)? Regards, Andy From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Don Burns Hi Andy, mainLoop() renderSurface->swapBuffers();
Now, you can also get
draw times (in the graphics card) by adding the following to the above code: osg::Timer_t beginUpdate, endUpdate, beginCull,
endCull, beginDispatch, endDispatch;
double waitTime;
On 9/8/06, Andy
Preece <[EMAIL PROTECTED]
> wrote: 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
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?
________________________________________________________________________ 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/
