Hi Himar,
The osgViewer does support window resize, the various examples illustrate this.
As for the window flickering, I can't really say, the normal OSG
examples shouldn't be doing this, but in your own app there isn't
certainly plenty of scope to cause things to flicker, such as using
single buffering rather than double buffering.
Robert.
On 6/19/07, Himar Carmona <[EMAIL PROTECTED]> wrote:
Thanks for the advice.
I notice osgviewer doesn't permit resizing the window, if i call
viewer.run() in my application, the window only resize the contents when
resizing is over, but when i call the equivalent loop, it refreshes during
the resize, but with an awful flickering (sure due to problems about
processing windows messaging, brrr). I just want to show the contents of OSG
inside a window with some Windows GUI (just like any CAD application). Is
this possible with OSG? I'm just thinking the problem is in Windows itself..
I'm evaluating OSG seriously, but i'm lack of time (oh dear, crunch
time) to make a good decision. Please forgive my lack of knowledge and my
mewbie questions (and a bit out of scope)
Thanks a lot.
Himar.
2007/6/19, Robert Osfield <[EMAIL PROTECTED]>:
> HI Himar,
>
> The osgViewer library has the GarphicsWindowWin32.cpp implementation,
> this will be transparently used be almost all the examples under
> Windows.
>
> There are also the osgviewer* examples including osgviewerMFC. There
> is a bit of variation in the way the window integration is tackled,
> most using GraphicsWindowEmbedded rather than window inheritance like
> in the MFC example. Window inheritance provide greater functionality
> than GraphicsWindowEmbedded especially on the threading front, but is
> a bit more complex to implement.
>
> Robert.
>
> On 6/19/07, Himar Carmona < [EMAIL PROTECTED]> wrote:
> > Thanks for the reply. Yes, i tried it with this results:
> >
> > If i call viewer.frame() from the WM_PAINT that's what happens:
> > - main Window.WndProc:
> > case WM_PAINT, call viewer.frame()
> > - in Viewer::frame( double simulationTime)
> > call Viewer::advance. OK.
> > -call Viewer::eventTraversal, in this function:
> > - it iterates the GrapchisContexts, for the
> > first context (which is GraphicsWindowWin32) it calls gw->checkEvents.
> > checkEvents have a
> > messageloop, and call TranslateMessage and DispatchMessage.
> > DispatchMessage
take
> > me again to my WndProc.
> >
> > The result is one pretty nonresponsive window with no content
rendered at
> > all.
> >
> > I don't have any idea where the problem could be. I tried to look at
the
> > source of the osgWin32demo example, but the link is broken. Are there
any
> > minimal example about how to control the window creation, make OSG use
it
> > for render, and controlling the render cycle? Haven't found any yet. The
MFC
> > example (OSGMFC in examples directory) makes a good job, but another one
> > without MFC, only pure Win32 will be helpful to me (the MFC example
renders
> > within a thread calling viewer.run or the equivalent loop). I will be
glad
> > to share my test scenario with the community if it can help anyone
starting
> > with OSG, but first i need to finish it..
> >
> > Again, thanks a lot for the reply, it makes me not feeling alone (joke
> > pretended..)
> >
> > 2007/6/19, Serge Lages <[EMAIL PROTECTED]>:
> > > Hi Himar,
> > >
> > >
> > > On 6/19/07, Himar Carmona < [EMAIL PROTECTED]> wrote:
> > > >
> > > > hello all,
> > > >
> > > > does anybody know how can i render only when its needed?
> > > >
> > > > I'm constructing a visualization system, and i use OSG 2.0
> > release. The application will be a WPF one, and i want to integrate a
viewer
> > into the main window. I have achieved render with it into my own window
(i
> > followed the example about MFC, is it the best method or are there other
> > methods?), but i just can't use viewer.run, because the main loop will
be
> > anywhere else. I just need to render the view on a WM_PAINT basis, only
when
> > needed, but when i called viewer.frame from my WndProc on paint message
it
> > just call WndProc again (from eventsTraversal). I haven't found yet any
> > clues about how to resolve this.
> > >
> > >
> > > viewer.frame() is the best way to only render one frame, and it should
> > work well. Have you tried to go step by step to follow what's happening
when
> > you call it ?
> > >
> > >
> > > >
> > > > Using the source helps, but i'm lacking on a high-level
> > description of what's going on (i'm new to OSG) and i haven't found any
> > description about the render loop or the frame cycle or whatever else.
(i
> > read the GettingStartedGuide). I think i have a misconception about how
OSG
> > works and a lot of confusion.
> > > >
> > > > Any ideas how to do this or where to found information about
will
> > be appreciated.
> > > >
> > > > Thanks everybody, have a nice day and bugfree programs.
> > > > Himar
> > > >
> > > >
> > > >
> > > >
> > > > _______________________________________________
> > > > osg-users mailing list
> > > > [email protected]
> > > >
http://openscenegraph.net/mailman/listinfo/osg-users
> > > > http://www.openscenegraph.org/
> > > >
> > >
> > >
> > >
> > > --
> > > Serge Lages
> > > http://www.magrathea-engine.org
> > > _______________________________________________
> > > osg-users mailing list
> > > [email protected]
> > > http://openscenegraph.net/mailman/listinfo/osg-users
> > > http://www.openscenegraph.org/
> > >
> >
> >
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://openscenegraph.net/mailman/listinfo/osg-users
> > http://www.openscenegraph.org/
> >
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/